diff options
| author | Stefan Monnier | 2003-06-17 18:40:06 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2003-06-17 18:40:06 +0000 |
| commit | aca8bee599cc13ae04cfcdccfd03554ed563fc42 (patch) | |
| tree | d71e85aa0d02d4db8648712887c301ac00472eb8 | |
| parent | 8bb5a227f1fa79dd56efe45fd1d31dc8f551a24b (diff) | |
| download | emacs-aca8bee599cc13ae04cfcdccfd03554ed563fc42.tar.gz emacs-aca8bee599cc13ae04cfcdccfd03554ed563fc42.zip | |
(kill-new): Leave yank-handler property alone if no
explicit yank-handler is specified.
(vis-mode-saved-buffer-invisibility-spec): Rename from
saved-buffer-invisibility-spec.
(vis-mode): Correctly handle the case where the mode is turned on
or off several times in a row.
| -rw-r--r-- | lisp/simple.el | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index 49701183ba5..c6cad27ed60 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -1811,8 +1811,7 @@ may access and use elements from the kill-ring directly, the STRING | |||
| 1811 | argument should still be a \"useful\" string for such uses." | 1811 | argument should still be a \"useful\" string for such uses." |
| 1812 | (if (> (length string) 0) | 1812 | (if (> (length string) 0) |
| 1813 | (if yank-handler | 1813 | (if yank-handler |
| 1814 | (put-text-property 0 1 'yank-handler yank-handler string) | 1814 | (put-text-property 0 1 'yank-handler yank-handler string)) |
| 1815 | (remove-list-of-text-properties 0 1 '(yank-handler) string)) | ||
| 1816 | (if yank-handler | 1815 | (if yank-handler |
| 1817 | (signal 'args-out-of-range | 1816 | (signal 'args-out-of-range |
| 1818 | (list string "yank-handler specified for empty string")))) | 1817 | (list string "yank-handler specified for empty string")))) |
| @@ -4481,9 +4480,7 @@ wait this many seconds after Emacs becomes idle before doing an update." | |||
| 4481 | :group 'display | 4480 | :group 'display |
| 4482 | :version "21.4") | 4481 | :version "21.4") |
| 4483 | 4482 | ||
| 4484 | (make-variable-buffer-local 'saved-buffer-invisibility-spec) | 4483 | (defvar vis-mode-saved-buffer-invisibility-spec nil |
| 4485 | |||
| 4486 | (defvar saved-buffer-invisibility-spec nil | ||
| 4487 | "Saved value of buffer-invisibility-spec when `vis-mode' is on.") | 4484 | "Saved value of buffer-invisibility-spec when `vis-mode' is on.") |
| 4488 | 4485 | ||
| 4489 | (define-minor-mode vis-mode | 4486 | (define-minor-mode vis-mode |
| @@ -4498,12 +4495,13 @@ the buffer visible. | |||
| 4498 | Disabling vis-mode restores the saved value of | 4495 | Disabling vis-mode restores the saved value of |
| 4499 | `buffer-invisibility-spec'." | 4496 | `buffer-invisibility-spec'." |
| 4500 | :lighter " Vis" | 4497 | :lighter " Vis" |
| 4501 | (if vis-mode | 4498 | (when (local-variable-p 'vis-mode-saved-buffer-invisibility-spec) |
| 4502 | (progn | 4499 | (setq buffer-invisibility-spec vis-mode-saved-buffer-invisibility-spec) |
| 4503 | (setq saved-buffer-invisibility-spec buffer-invisibility-spec | 4500 | (kill-local-variable 'vis-mode-saved-buffer-invisibility-spec)) |
| 4504 | buffer-invisibility-spec nil)) | 4501 | (when vis-mode |
| 4505 | (setq buffer-invisibility-spec saved-buffer-invisibility-spec | 4502 | (set (make-local-variable 'vis-mode-saved-buffer-invisibility-spec) |
| 4506 | saved-buffer-invisibility-spec nil))) | 4503 | buffer-invisibility-spec) |
| 4504 | (setq buffer-invisibility-spec nil))) | ||
| 4507 | 4505 | ||
| 4508 | ;; Minibuffer prompt stuff. | 4506 | ;; Minibuffer prompt stuff. |
| 4509 | 4507 | ||