From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: when deleting in minibuffer, don't change kill-ring Date: Fri, 28 Oct 2011 09:10:04 +0200 Message-ID: <87bot1r3qr.fsf@thinkpad.tsdh.de> References: <7AF781F7ABA44DA5A698D5AFA772C4B2@us.oracle.com> <87pqhiuwcy.fsf@thinkpad.tsdh.de> <2E5FB92AF4854B6CB7774F5D671C3320@us.oracle.com> <877h3pli9b.fsf@thinkpad.tsdh.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1319785835 29913 80.91.229.12 (28 Oct 2011 07:10:35 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 28 Oct 2011 07:10:35 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 28 09:10:31 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RJgaE-0002Pn-Ql for geh-help-gnu-emacs@m.gmane.org; Fri, 28 Oct 2011 09:10:31 +0200 Original-Received: from localhost ([::1]:52113 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJgaE-0002f5-9y for geh-help-gnu-emacs@m.gmane.org; Fri, 28 Oct 2011 03:10:30 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:41796) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJga9-0002ev-HK for help-gnu-emacs@gnu.org; Fri, 28 Oct 2011 03:10:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RJga7-0002NA-Oi for help-gnu-emacs@gnu.org; Fri, 28 Oct 2011 03:10:25 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:49192) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJga7-0002Mu-J5 for help-gnu-emacs@gnu.org; Fri, 28 Oct 2011 03:10:23 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RJga6-0002Mo-3h for help-gnu-emacs@gnu.org; Fri, 28 Oct 2011 09:10:22 +0200 Original-Received: from tsdh.uni-koblenz.de ([141.26.67.142]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 28 Oct 2011 09:10:22 +0200 Original-Received: from tassilo by tsdh.uni-koblenz.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 28 Oct 2011 09:10:22 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 22 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: tsdh.uni-koblenz.de User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux) Cancel-Lock: sha1:ERl+u6uf6sl88qYiyuQwnsOBuHA= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:82685 Archived-At: Tassilo Horn 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