From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Webb S." Newsgroups: gmane.emacs.help Subject: Re: Adding a hook to sql-mode? Date: Thu, 11 Dec 2008 19:47:45 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <442a49e1-d94d-4771-9d2d-adff564c7afe@w24g2000prd.googlegroups.com> <81zlj6hz6w.fsf@myhost.sbcglobal.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1229063657 15358 80.91.229.12 (12 Dec 2008 06:34:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 12 Dec 2008 06:34:17 +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 Dec 12 07:35:24 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 1LB1cQ-0000CE-Bt for geh-help-gnu-emacs@m.gmane.org; Fri, 12 Dec 2008 07:35:22 +0100 Original-Received: from localhost ([127.0.0.1]:50590 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LB1bE-00062f-Uy for geh-help-gnu-emacs@m.gmane.org; Fri, 12 Dec 2008 01:34:08 -0500 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!t26g2000prh.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 15 Original-NNTP-Posting-Host: 70.56.252.129 Original-X-Trace: posting.google.com 1229053665 16360 127.0.0.1 (12 Dec 2008 03:47:45 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Fri, 12 Dec 2008 03:47:45 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: t26g2000prh.googlegroups.com; posting-host=70.56.252.129; posting-account=c7eNVwoAAABl5IpFLf4ooTShfg15YNZd User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4,gzip(gfe),gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:165235 X-Mailman-Approved-At: Fri, 12 Dec 2008 01:33:30 -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:60564 Archived-At: > > (add-hook 'sql-mode-hook '(lambda () (setq indent-tabs-mode t tab- > width 4))) As a final followup: this works great to add the hook, but it didn't get the simple tab inserting behavior I wanted (still lined up the cursor with the end of the word above it) so I did the following: (add-hook 'sql-mode-hook '(lambda () (define-key sql-mode-map (kbd "TAB") 'self-insert-command))) And it works now Thanks to everyone!