[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/simple.el [lexbind]
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/simple.el [lexbind] |
Date: |
Wed, 08 Dec 2004 19:17:26 -0500 |
Index: emacs/lisp/simple.el
diff -c emacs/lisp/simple.el:1.551.2.32 emacs/lisp/simple.el:1.551.2.33
*** emacs/lisp/simple.el:1.551.2.32 Fri Nov 12 04:21:13 2004
--- emacs/lisp/simple.el Wed Dec 8 23:36:20 2004
***************
*** 1,7 ****
;;; simple.el --- basic editing commands for Emacs
! ;; Copyright (C) 1985, 86, 87, 93, 94, 95, 96, 97, 98, 99,
! ;; 2000, 01, 02, 03, 2004
;; Free Software Foundation, Inc.
;; Maintainer: FSF
--- 1,7 ----
;;; simple.el --- basic editing commands for Emacs
! ;; Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
! ;; 2000, 2001, 2002, 2003, 2004
;; Free Software Foundation, Inc.
;; Maintainer: FSF
***************
*** 123,143 ****
(make-variable-buffer-local 'next-error-function)
! (defsubst next-error-buffer-p (buffer &optional extra-test)
! "Test if BUFFER is a next-error capable buffer."
(with-current-buffer buffer
! (or (and extra-test (funcall extra-test))
! next-error-function)))
!
! (defun next-error-find-buffer (&optional other-buffer extra-test)
! "Return a next-error capable buffer."
(or
;; 1. If one window on the selected frame displays such buffer, return it.
(let ((window-buffers
(delete-dups
(delq nil (mapcar (lambda (w)
(if (next-error-buffer-p
! (window-buffer w) extra-test)
(window-buffer w)))
(window-list))))))
(if other-buffer
--- 123,155 ----
(make-variable-buffer-local 'next-error-function)
! (defsubst next-error-buffer-p (buffer
! &optional
! extra-test-inclusive
! extra-test-exclusive)
! "Test if BUFFER is a next-error capable buffer.
! EXTRA-TEST-INCLUSIVE is called to allow extra buffers.
! EXTRA-TEST-INCLUSIVE is called to disallow buffers."
(with-current-buffer buffer
! (or (and extra-test-inclusive (funcall extra-test-inclusive))
! (and (if extra-test-exclusive (funcall extra-test-exclusive) t)
! next-error-function))))
!
! (defun next-error-find-buffer (&optional other-buffer
! extra-test-inclusive
! extra-test-exclusive)
! "Return a next-error capable buffer.
! OTHER-BUFFER will disallow the current buffer.
! EXTRA-TEST-INCLUSIVE is called to allow extra buffers.
! EXTRA-TEST-INCLUSIVE is called to disallow buffers."
(or
;; 1. If one window on the selected frame displays such buffer, return it.
(let ((window-buffers
(delete-dups
(delq nil (mapcar (lambda (w)
(if (next-error-buffer-p
! (window-buffer w)
! extra-test-inclusive extra-test-exclusive)
(window-buffer w)))
(window-list))))))
(if other-buffer
***************
*** 147,170 ****
;; 2. If next-error-last-buffer is set to a live buffer, use that.
(if (and next-error-last-buffer
(buffer-name next-error-last-buffer)
! (next-error-buffer-p next-error-last-buffer extra-test)
(or (not other-buffer)
(not (eq next-error-last-buffer (current-buffer)))))
next-error-last-buffer)
;; 3. If the current buffer is a next-error capable buffer, return it.
(if (and (not other-buffer)
! (next-error-buffer-p (current-buffer) extra-test))
(current-buffer))
;; 4. Look for a next-error capable buffer in a buffer list.
(let ((buffers (buffer-list)))
(while (and buffers
! (or (not (next-error-buffer-p (car buffers) extra-test))
(and other-buffer (eq (car buffers) (current-buffer)))))
(setq buffers (cdr buffers)))
(if buffers
(car buffers)
(or (and other-buffer
! (next-error-buffer-p (current-buffer) extra-test)
;; The current buffer is a next-error capable buffer.
(progn
(if other-buffer
--- 159,187 ----
;; 2. If next-error-last-buffer is set to a live buffer, use that.
(if (and next-error-last-buffer
(buffer-name next-error-last-buffer)
! (next-error-buffer-p next-error-last-buffer
! extra-test-inclusive extra-test-exclusive)
(or (not other-buffer)
(not (eq next-error-last-buffer (current-buffer)))))
next-error-last-buffer)
;; 3. If the current buffer is a next-error capable buffer, return it.
(if (and (not other-buffer)
! (next-error-buffer-p (current-buffer)
! extra-test-inclusive extra-test-exclusive))
(current-buffer))
;; 4. Look for a next-error capable buffer in a buffer list.
(let ((buffers (buffer-list)))
(while (and buffers
! (or (not (next-error-buffer-p
! (car buffers)
! extra-test-inclusive extra-test-exclusive))
(and other-buffer (eq (car buffers) (current-buffer)))))
(setq buffers (cdr buffers)))
(if buffers
(car buffers)
(or (and other-buffer
! (next-error-buffer-p (current-buffer)
! extra-test-inclusive extra-test-exclusive)
;; The current buffer is a next-error capable buffer.
(progn
(if other-buffer
***************
*** 719,725 ****
(defun what-line ()
"Print the current buffer line number and narrowed line number of point."
(interactive)
! (let ((opoint (point)) (start (point-min))
(n (line-number-at-pos)))
(if (= start 1)
(message "Line %d" n)
--- 736,742 ----
(defun what-line ()
"Print the current buffer line number and narrowed line number of point."
(interactive)
! (let ((start (point-min))
(n (line-number-at-pos)))
(if (= start 1)
(message "Line %d" n)
***************
*** 3107,3113 ****
;; for intermediate positions.
(let ((inhibit-point-motion-hooks t)
(opoint (point))
! new line-end line-beg)
(unwind-protect
(progn
(if (not (memq last-command '(next-line previous-line)))
--- 3124,3130 ----
;; for intermediate positions.
(let ((inhibit-point-motion-hooks t)
(opoint (point))
! (forward (> arg 0)))
(unwind-protect
(progn
(if (not (memq last-command '(next-line previous-line)))
***************
*** 3181,3189 ****
;; at least go to end of line.
(beginning-of-line))
(t
! (line-move-finish (or goal-column temporary-goal-column)
opoint))))))
! (defun line-move-finish (column opoint)
(let ((repeat t))
(while repeat
;; Set REPEAT to t to repeat the whole thing.
--- 3198,3207 ----
;; at least go to end of line.
(beginning-of-line))
(t
! (line-move-finish (or goal-column temporary-goal-column)
! opoint forward))))))
! (defun line-move-finish (column opoint forward)
(let ((repeat t))
(while repeat
;; Set REPEAT to t to repeat the whole thing.
***************
*** 3193,3202 ****
(line-beg (save-excursion (beginning-of-line) (point)))
(line-end
;; Compute the end of the line
! ;; ignoring effectively intangible newlines.
(save-excursion
! (let ((inhibit-point-motion-hooks nil)
! (inhibit-field-text-motion t))
(end-of-line))
(point))))
--- 3211,3221 ----
(line-beg (save-excursion (beginning-of-line) (point)))
(line-end
;; Compute the end of the line
! ;; ignoring effectively invisible newlines.
(save-excursion
! (end-of-line)
! (while (and (not (eobp)) (line-move-invisible-p (point)))
! (goto-char (next-char-property-change (point)))
(end-of-line))
(point))))
***************
*** 3220,3226 ****
;; try the previous allowable position.
;; See if it is ok.
(backward-char)
! (if (<= (point) line-end)
(setq new (point))
;; As a last resort, use the end of the line.
(setq new line-end))))
--- 3239,3251 ----
;; try the previous allowable position.
;; See if it is ok.
(backward-char)
! (if (if forward
! ;; If going forward, don't accept the previous
! ;; allowable position if it is before the target line.
! (< line-beg (point))
! ;; If going backward, don't accept the previous
! ;; allowable position if it is still after the target line.
! (<= (point) line-end))
(setq new (point))
;; As a last resort, use the end of the line.
(setq new line-end))))
***************
*** 3902,3917 ****
(setq blinkpos (scan-sexps oldpos -1)))
(error nil)))
(and blinkpos
! (save-excursion
! (goto-char blinkpos)
! (not (looking-at "\\s$")))
(setq matching-paren
! (or (and parse-sexp-lookup-properties
! (let ((prop (get-text-property blinkpos
'syntax-table)))
! (and (consp prop)
! (eq (car prop) 4)
! (cdr prop))))
! (matching-paren (char-after blinkpos)))
mismatch
(or (null matching-paren)
(/= (char-after (1- oldpos))
--- 3927,3938 ----
(setq blinkpos (scan-sexps oldpos -1)))
(error nil)))
(and blinkpos
! (not (eq (car (syntax-after blinkpos)) 8)) ;Not syntax '$'.
(setq matching-paren
! (let ((syntax (syntax-after blinkpos)))
! (and (consp syntax)
! (eq (car syntax) 4)
! (cdr syntax)))
mismatch
(or (null matching-paren)
(/= (char-after (1- oldpos))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/simple.el [lexbind],
Miles Bader <=