diff options
author | Richard M. Stallman <rms@gnu.org> | 2002-09-01 13:29:34 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2002-09-01 13:29:34 +0000 |
commit | 5560dc5d191b28c73a3ef05a8864eb865fbe21e8 (patch) | |
tree | f0d64a4aa7bbacad70a4391c705e940a4463da87 /lisp/simple.el | |
parent | ca66efd171d96397b9f07240b91ea70d662af095 (diff) | |
download | emacs-5560dc5d191b28c73a3ef05a8864eb865fbe21e8.tar.gz |
(kill-line): Use end-of-visible-line to determine
if rest of line is blank.
(end-of-visible-line): Cope if end-of-line moved back over
invisible intangible chars at end of line.
(completion-setup-function): Don't use directory-sep-char.
Diffstat (limited to 'lisp/simple.el')
-rw-r--r-- | lisp/simple.el | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index ff10343b597..4eb74f2bc0d 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -2093,9 +2093,15 @@ you can use this command to copy text from a read-only buffer." (forward-visible-line (prefix-numeric-value arg)) (if (eobp) (signal 'end-of-buffer nil)) - (if (or (looking-at "[ \t]*$") (and kill-whole-line (bolp))) - (forward-visible-line 1) - (end-of-visible-line))) + (let ((end + (save-excursion + (end-of-visible-line) (point)))) + (if (or (save-excursion + (skip-chars-forward " \t" end) + (= (point) end)) + (and kill-whole-line (bolp))) + (forward-visible-line 1) + (goto-char end)))) (point)))) (defun forward-visible-line (arg) @@ -2157,12 +2163,15 @@ If ARG is zero, move to the beginning of the current line." ;; skip all characters with that same `invisible' property value, ;; then find the next newline. (while (and (not (eobp)) - (let ((prop - (get-char-property (point) 'invisible))) - (if (eq buffer-invisibility-spec t) - prop - (or (memq prop buffer-invisibility-spec) - (assq prop buffer-invisibility-spec))))) + (save-excursion + (skip-chars-forward "^\n") + (let ((prop + (get-char-property (point) 'invisible))) + (if (eq buffer-invisibility-spec t) + prop + (or (memq prop buffer-invisibility-spec) + (assq prop buffer-invisibility-spec)))))) + (skip-chars-forward "^\n") (if (get-text-property (point) 'invisible) (goto-char (next-single-property-change (point) 'invisible)) (goto-char (next-overlay-change (point)))) @@ -3932,7 +3941,7 @@ The completion list buffer is available as the value of `standard-output'.") (save-excursion (set-buffer mainbuf) (goto-char (point-max)) - (skip-chars-backward (format "^%c" directory-sep-char)) + (skip-chars-backward "^/") (- (point) (minibuffer-prompt-end)))) ;; Otherwise, in minibuffer, the whole input is being completed. (save-match-data |