:group 'next-error
:version "22.1")
-(defcustom next-error-highlight 0.1
+(defcustom next-error-highlight 0.5
"*Highlighting of locations in selected source buffers.
If number, highlight the locus in `next-error' face for given time in seconds.
If t, highlight the locus indefinitely until some other locus replaces it.
:group 'next-error
:version "22.1")
-(defcustom next-error-highlight-no-select 0.1
- "*Highlighting of locations in non-selected source buffers.
+(defcustom next-error-highlight-no-select 0.5
+ "*Highlighting of locations in `next-error-no-select'.
If number, highlight the locus in `next-error' face for given time in seconds.
If t, highlight the locus indefinitely until some other locus replaces it.
If nil, don't highlight the locus in the source buffer.
(next-error-buffer-p (current-buffer) nil
extra-test-inclusive extra-test-exclusive)
(progn
- (message "This is the only next-error capable buffer")
+ (message "This is the only buffer with error message locations")
(current-buffer)))
;; 6. Give up.
- (error "No next-error capable buffer found")))
+ (error "No buffers contain error message locations")))
(defun next-error (&optional arg reset)
"Visit next `next-error' message and corresponding source code.
(defun delete-horizontal-space (&optional backward-only)
"Delete all spaces and tabs around point.
-If BACKWARD-ONLY is non-nil, only delete spaces before point."
- (interactive "*")
+If BACKWARD-ONLY is non-nil, only delete them before point."
+ (interactive "*P")
(let ((orig-pos (point)))
(delete-region
(if backward-only
(single-key-description char))
encoding-msg pos total percent col hscroll))))))
\f
-(defvar read-expression-map
- (let ((m (make-sparse-keymap)))
- (define-key m "\M-\t" 'lisp-complete-symbol)
- (set-keymap-parent m minibuffer-local-map)
- m)
- "Minibuffer keymap used for reading Lisp expressions.")
+;; Initialize read-expression-map. It is defined at C level.
+(let ((m (make-sparse-keymap)))
+ (define-key m "\M-\t" 'lisp-complete-symbol)
+ (set-keymap-parent m minibuffer-local-map)
+ (setq read-expression-map m))
(defvar read-expression-history nil)
then call `undo-more' one or more times to undo them."
(or (listp pending-undo-list)
(error (concat "No further undo information"
- (and transient-mark-mode mark-active
- " for region"))))
+ (and undo-in-region " for region"))))
(let ((undo-in-progress t))
(setq pending-undo-list (primitive-undo n pending-undo-list))
(if (null pending-undo-list)
((null (car undo-elt))
;; (nil PROPERTY VALUE BEG . END)
(let ((tail (nthcdr 3 undo-elt)))
- (not (or (< (car tail) end)
- (> (cdr tail) start)))))
+ (and (< (car tail) end)
+ (> (cdr tail) start))))
((integerp (car undo-elt))
;; (BEGIN . END)
- (not (or (< (car undo-elt) end)
- (> (cdr undo-elt) start))))))
+ (and (< (car undo-elt) end)
+ (> (cdr undo-elt) start)))))
;; Return the first affected buffer position and the delta for an undo element
;; delta is defined as the change in subsequent buffer positions if we *did*
Normally, Emacs discards the undo info for the current command if
it exceeds `undo-outer-limit'. But if you set this option
non-nil, it asks in the echo area whether to discard the info.
-If you answer no, there a slight risk that Emacs might crash, so
+If you answer no, there is a slight risk that Emacs might crash, so
only do it if you really want to undo the command.
This option is mainly intended for debugging. You have to be
;; This is actually used in subr.el but defcustom does not work there.
(defcustom yank-excluded-properties
'(read-only invisible intangible field mouse-face help-echo local-map keymap
- yank-handler follow-link)
+ yank-handler follow-link fontified)
"*Text properties to discard when yanking.
The value should be a list of text properties to discard or t,
which means to discard all text properties."
`yank-excluded-properties' and `yank-handler' as described in the
doc string for `insert-for-yank-1', which see.
-See also the command \\[yank-pop]."
+See also the command `yank-pop' (\\[yank-pop])."
(interactive "*P")
(setq yank-window-start (window-start))
;; If we don't get all the way thru, make last-command indicate that
(>= rbot (frame-char-height))
(<= ypos (- (frame-char-height))))
(unless lh
- (let* ((wend (window-end nil t))
- (evis (or (pos-visible-in-window-p wend nil t)
- (pos-visible-in-window-p (1- wend) nil t))))
- (setq rbot (nth 3 evis)
- vpos (nth 5 evis))))
+ (let ((wend (pos-visible-in-window-p t nil t)))
+ (setq rbot (nth 3 wend)
+ vpos (nth 5 wend))))
(cond
;; If last line of window is fully visible, move forward.
((or (null rbot) (= rbot 0))
;; for intermediate positions.
(let ((inhibit-point-motion-hooks t)
(opoint (point))
- (forward (> arg 0)))
+ (orig-arg arg))
(unwind-protect
(progn
(if (not (memq last-command '(next-line previous-line)))
'end-of-buffer)
nil)))
;; Move by arg lines, but ignore invisible ones.
- (let (done)
+ (let (done line-end)
(while (and (> arg 0) (not done))
;; If the following character is currently invisible,
;; skip all characters with that same `invisible' property value.
(while (and (not (eobp)) (line-move-invisible-p (point)))
(goto-char (next-char-property-change (point))))
- ;; Now move a line.
- (end-of-line)
+ ;; Move a line.
+ ;; We don't use `end-of-line', since we want to escape
+ ;; from field boundaries ocurring exactly at point.
+ (let ((inhibit-field-text-motion t))
+ (setq line-end (line-end-position)))
+ (goto-char (constrain-to-field line-end (point) t t))
;; If there's no invisibility here, move over the newline.
(cond
((eobp)
;; The logic of this is the same as the loop above,
;; it just goes in the other direction.
(while (and (< arg 0) (not done))
- (beginning-of-line)
+ ;; For completely consistency with the forward-motion
+ ;; case, we should call beginning-of-line here.
+ ;; However, if point is inside a field and on a
+ ;; continued line, the call to (vertical-motion -1)
+ ;; below won't move us back far enough; then we return
+ ;; to the same column in line-move-finish, and point
+ ;; gets stuck -- cyd
+ (forward-line 0)
(cond
((bobp)
(if (not noerror)
(beginning-of-line))
(t
(line-move-finish (or goal-column temporary-goal-column)
- opoint forward))))))
+ opoint (> orig-arg 0)))))))
(defun line-move-finish (column opoint forward)
(let ((repeat t))
(setq repeat nil)
(let (new
+ (old (point))
(line-beg (save-excursion (beginning-of-line) (point)))
(line-end
;; Compute the end of the line
;; Move to the desired column.
(line-move-to-column column)
+
+ ;; Corner case: suppose we start out in a field boundary in
+ ;; the middle of a continued line. When we get to
+ ;; line-move-finish, point is at the start of a new *screen*
+ ;; line but the same text line; then line-move-to-column would
+ ;; move us backwards. Test using C-n with point on the "x" in
+ ;; (insert "a" (propertize "x" 'field t) (make-string 89 ?y))
+ (and forward
+ (< (point) old)
+ (goto-char old))
+
(setq new (point))
;; Process intangibility within a line.
(goto-char opoint)
(let ((inhibit-point-motion-hooks nil))
(goto-char
- (constrain-to-field new opoint nil t
- 'inhibit-line-move-field-capture)))
+ ;; Ignore field boundaries if the initial and final
+ ;; positions have the same `field' property, even if the
+ ;; fields are non-contiguous. This seems to be "nicer"
+ ;; behavior in many situations.
+ (if (eq (get-char-property new 'field)
+ (get-char-property opoint 'field))
+ new
+ (constrain-to-field new opoint t t
+ 'inhibit-line-move-field-capture))))
;; If all this moved us to a different line,
;; retry everything within that new line.
(kill-region (point) (progn (forward-word arg) (point))))
(defun backward-kill-word (arg)
- "Kill characters backward until encountering the end of a word.
+ "Kill characters backward until encountering the beginning of a word.
With argument, do this that many times."
(interactive "p")
(kill-word (- arg)))
(defvaralias 'default-indicate-unused-lines 'default-indicate-empty-lines)
(defun toggle-truncate-lines (&optional arg)
- "Toggle whether to fold or truncate long lines on the screen.
+ "Toggle whether to fold or truncate long lines for the current buffer.
With arg, truncate long lines iff arg is positive.
Note that in side-by-side windows, truncation is always enabled."
(interactive "P")