help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: when deleting in minibuffer, don't change kill-ring


From: Tassilo Horn
Subject: Re: when deleting in minibuffer, don't change kill-ring
Date: Fri, 28 Oct 2011 09:10:04 +0200
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux)

Tassilo Horn <tassilo@member.fsf.org> writes:

> Using this advice, I think I finally got the intended behavior:
>
> (defadvice kill-all-local-variables (around th-keep-minibuffer-kill-ring 
> activate)
>   (let ((b (current-buffer)))
>     (when (minibufferp b)
>       (let ((kr kill-ring))
>       ad-do-it
>       (set (make-local-variable 'kill-ring) kr)))))
>
> Now, when reentering the minibuffer I can yank the stuff I killed in
> previous minibuffer sessions, and those kills don't show up in the
> global kill-ring.

Argh, this somehow has the weird side effect of disturbing font-lock
somehow.  For example, after starting emacs with the advice above, the
comment in *scratch* is not highlighted, and the same applies to latex
buffers.  Elisp buffers are highlighted, though...

Bye,
Tassilo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]