From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: Mode hooks WAS: icicles lisp-mode dabbrev-completion Date: Mon, 19 Dec 2005 14:56:00 -0700 Message-ID: References: <20051219210846.26630.qmail@mail01.vipmail.hu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1135029762 6666 80.91.229.2 (19 Dec 2005 22:02:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 19 Dec 2005 22:02:42 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Dec 19 23:02:41 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EoT3T-0007rG-8m for geh-help-gnu-emacs@m.gmane.org; Mon, 19 Dec 2005 23:00:27 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EoT4K-0004KJ-OJ for geh-help-gnu-emacs@m.gmane.org; Mon, 19 Dec 2005 17:01:20 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EoT3j-0004Bz-5w for help-gnu-emacs@gnu.org; Mon, 19 Dec 2005 17:00:43 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EoT3h-0004B6-Ib for help-gnu-emacs@gnu.org; Mon, 19 Dec 2005 17:00:42 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EoT3h-0004B0-Dk for help-gnu-emacs@gnu.org; Mon, 19 Dec 2005 17:00:41 -0500 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1EoT6i-0008Fo-4R for help-gnu-emacs@gnu.org; Mon, 19 Dec 2005 17:03:48 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1EoT0x-0006rx-LC for help-gnu-emacs@gnu.org; Mon, 19 Dec 2005 22:57:51 +0100 Original-Received: from 207.167.42.60 ([207.167.42.60]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 19 Dec 2005 22:57:51 +0100 Original-Received: from ihs_4664 by 207.167.42.60 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 19 Dec 2005 22:57:51 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: help-gnu-emacs@gnu.org Original-Lines: 29 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 207.167.42.60 User-Agent: Mozilla Thunderbird 0.9 (X11/20041105) X-Accept-Language: en-us, en In-Reply-To: <20051219210846.26630.qmail@mail01.vipmail.hu> X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:32077 Archived-At: Emabela wrote: > During a correspondence with Drew Adams, who > helped me very much, I simplified the to the following situation: > > Bind tab to beginning-of-line in lisp-mode. > > Hence, in my first test I used the following very short .emacs: > (defun my-lisp-addons () > (progn > (print "my-lisp-addons is running") > (local-unset-key "\t") > (local-set-key [(tab)] 'beginning-of-line))) > (add-hook 'lisp-mode-hook 'my-lisp-addons) > > If I start: emacs --debug-init /tmp/some.el, > then the buffer is in lisp-mode, No, the buffer is in emacs-lisp-mode (C-h v major-mode). > but my-lisp-addons does not run. > > The same, if I open /tmp/some.el with C-x C-f. > > But if I type in M-x lisp-mode, then it works, of course. Naturally. -- Kevin Rodgers