mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-10 01:34:36 -08:00
(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.
This commit is contained in:
parent
8bb5a227f1
commit
aca8bee599
1 changed files with 9 additions and 11 deletions
|
|
@ -1811,8 +1811,7 @@ may access and use elements from the kill-ring directly, the STRING
|
|||
argument should still be a \"useful\" string for such uses."
|
||||
(if (> (length string) 0)
|
||||
(if yank-handler
|
||||
(put-text-property 0 1 'yank-handler yank-handler string)
|
||||
(remove-list-of-text-properties 0 1 '(yank-handler) string))
|
||||
(put-text-property 0 1 'yank-handler yank-handler string))
|
||||
(if yank-handler
|
||||
(signal 'args-out-of-range
|
||||
(list string "yank-handler specified for empty string"))))
|
||||
|
|
@ -4481,9 +4480,7 @@ wait this many seconds after Emacs becomes idle before doing an update."
|
|||
:group 'display
|
||||
:version "21.4")
|
||||
|
||||
(make-variable-buffer-local 'saved-buffer-invisibility-spec)
|
||||
|
||||
(defvar saved-buffer-invisibility-spec nil
|
||||
(defvar vis-mode-saved-buffer-invisibility-spec nil
|
||||
"Saved value of buffer-invisibility-spec when `vis-mode' is on.")
|
||||
|
||||
(define-minor-mode vis-mode
|
||||
|
|
@ -4498,12 +4495,13 @@ the buffer visible.
|
|||
Disabling vis-mode restores the saved value of
|
||||
`buffer-invisibility-spec'."
|
||||
:lighter " Vis"
|
||||
(if vis-mode
|
||||
(progn
|
||||
(setq saved-buffer-invisibility-spec buffer-invisibility-spec
|
||||
buffer-invisibility-spec nil))
|
||||
(setq buffer-invisibility-spec saved-buffer-invisibility-spec
|
||||
saved-buffer-invisibility-spec nil)))
|
||||
(when (local-variable-p 'vis-mode-saved-buffer-invisibility-spec)
|
||||
(setq buffer-invisibility-spec vis-mode-saved-buffer-invisibility-spec)
|
||||
(kill-local-variable 'vis-mode-saved-buffer-invisibility-spec))
|
||||
(when vis-mode
|
||||
(set (make-local-variable 'vis-mode-saved-buffer-invisibility-spec)
|
||||
buffer-invisibility-spec)
|
||||
(setq buffer-invisibility-spec nil)))
|
||||
|
||||
;; Minibuffer prompt stuff.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue