From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dave Benjamin Newsgroups: gmane.emacs.help Subject: Re: global-set-key in text-mode Date: Sat, 23 Feb 2008 23:12:32 -0700 Organization: Cox Message-ID: <47C10AD0.30400@lackingtalent.com> References: <87ve4j4h6k.fsf@W0053328.mgh.harvard.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1203839905 9336 80.91.229.12 (24 Feb 2008 07:58:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 24 Feb 2008 07:58:25 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Feb 24 08:58:50 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JTBkz-0002Zq-1Y for geh-help-gnu-emacs@m.gmane.org; Sun, 24 Feb 2008 08:58:45 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JTBkT-0006SQ-4p for geh-help-gnu-emacs@m.gmane.org; Sun, 24 Feb 2008 02:58:13 -0500 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!bigfeed.bellsouth.net!bigfeed2.bellsouth.net!news.bellsouth.net!hwmnpeer01.phx!news.highwinds-media.com!hw-filter.phx!newsfe15.phx.POSTED!53ab2750!not-for-mail User-Agent: Mozilla-Thunderbird 2.0.0.9 (X11/20080110) Original-Newsgroups: gnu.emacs.help In-Reply-To: Original-Lines: 19 Original-NNTP-Posting-Host: 72.208.52.84 Original-X-Complaints-To: newsmaster@cox.net Original-X-Trace: newsfe15.phx 1203833475 72.208.52.84 (Sat, 23 Feb 2008 23:11:15 MST) Original-NNTP-Posting-Date: Sat, 23 Feb 2008 23:11:15 MST Original-Xref: shelby.stanford.edu gnu.emacs.help:156441 X-Mailman-Approved-At: Sun, 24 Feb 2008 02:57:55 -0500 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:51812 Archived-At: educkworth@loyola.edu wrote: > I've gotten it to work through dumb trial and error. I didn't use the > add-hook command, just a straight > > (define-key text-mode-map "\M-s" 'save-buffer) > > in my .emacs. > > Thanks for steering me in the right direction. FWIW, I have the following in my .emacs: ;; keep text-mode from stealing M-s key binding (define-key text-mode-map "\es" nil) (define-key text-mode-map "\eS" nil) This way, my global binding works as intended. Dave