diff options
| author | Richard M. Stallman | 2002-09-01 13:29:34 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2002-09-01 13:29:34 +0000 |
| commit | 5560dc5d191b28c73a3ef05a8864eb865fbe21e8 (patch) | |
| tree | f0d64a4aa7bbacad70a4391c705e940a4463da87 | |
| parent | ca66efd171d96397b9f07240b91ea70d662af095 (diff) | |
| download | emacs-5560dc5d191b28c73a3ef05a8864eb865fbe21e8.tar.gz emacs-5560dc5d191b28c73a3ef05a8864eb865fbe21e8.zip | |
(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.
| -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." | |||
| 2093 | (forward-visible-line (prefix-numeric-value arg)) | 2093 | (forward-visible-line (prefix-numeric-value arg)) |
| 2094 | (if (eobp) | 2094 | (if (eobp) |
| 2095 | (signal 'end-of-buffer nil)) | 2095 | (signal 'end-of-buffer nil)) |
| 2096 | (if (or (looking-at "[ \t]*$") (and kill-whole-line (bolp))) | 2096 | (let ((end |
| 2097 | (forward-visible-line 1) | 2097 | (save-excursion |
| 2098 | (end-of-visible-line))) | 2098 | (end-of-visible-line) (point)))) |
| 2099 | (if (or (save-excursion | ||
| 2100 | (skip-chars-forward " \t" end) | ||
| 2101 | (= (point) end)) | ||
| 2102 | (and kill-whole-line (bolp))) | ||
| 2103 | (forward-visible-line 1) | ||
| 2104 | (goto-char end)))) | ||
| 2099 | (point)))) | 2105 | (point)))) |
| 2100 | 2106 | ||
| 2101 | (defun forward-visible-line (arg) | 2107 | (defun forward-visible-line (arg) |
| @@ -2157,12 +2163,15 @@ If ARG is zero, move to the beginning of the current line." | |||
| 2157 | ;; skip all characters with that same `invisible' property value, | 2163 | ;; skip all characters with that same `invisible' property value, |
| 2158 | ;; then find the next newline. | 2164 | ;; then find the next newline. |
| 2159 | (while (and (not (eobp)) | 2165 | (while (and (not (eobp)) |
| 2160 | (let ((prop | 2166 | (save-excursion |
| 2161 | (get-char-property (point) 'invisible))) | 2167 | (skip-chars-forward "^\n") |
| 2162 | (if (eq buffer-invisibility-spec t) | 2168 | (let ((prop |
| 2163 | prop | 2169 | (get-char-property (point) 'invisible))) |
| 2164 | (or (memq prop buffer-invisibility-spec) | 2170 | (if (eq buffer-invisibility-spec t) |
| 2165 | (assq prop buffer-invisibility-spec))))) | 2171 | prop |
| 2172 | (or (memq prop buffer-invisibility-spec) | ||
| 2173 | (assq prop buffer-invisibility-spec)))))) | ||
| 2174 | (skip-chars-forward "^\n") | ||
| 2166 | (if (get-text-property (point) 'invisible) | 2175 | (if (get-text-property (point) 'invisible) |
| 2167 | (goto-char (next-single-property-change (point) 'invisible)) | 2176 | (goto-char (next-single-property-change (point) 'invisible)) |
| 2168 | (goto-char (next-overlay-change (point)))) | 2177 | (goto-char (next-overlay-change (point)))) |
| @@ -3932,7 +3941,7 @@ The completion list buffer is available as the value of `standard-output'.") | |||
| 3932 | (save-excursion | 3941 | (save-excursion |
| 3933 | (set-buffer mainbuf) | 3942 | (set-buffer mainbuf) |
| 3934 | (goto-char (point-max)) | 3943 | (goto-char (point-max)) |
| 3935 | (skip-chars-backward (format "^%c" directory-sep-char)) | 3944 | (skip-chars-backward "^/") |
| 3936 | (- (point) (minibuffer-prompt-end)))) | 3945 | (- (point) (minibuffer-prompt-end)))) |
| 3937 | ;; Otherwise, in minibuffer, the whole input is being completed. | 3946 | ;; Otherwise, in minibuffer, the whole input is being completed. |
| 3938 | (save-match-data | 3947 | (save-match-data |