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

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

Forcing tabs in sql mode


From: Webb S.
Subject: Forcing tabs in sql mode
Date: Sun, 7 Dec 2008 13:27:00 -0800 (PST)
User-agent: G2/1.0

Hi all

If I open schema.sql I get funky indentation, where emacs changes my
tabs to a mix of spaces etc.  I can fix this by running the following
in the eval (alt-:) buffer:

(define-key sql-mode-map (kbd "TAB") 'self-insert-command)
(setq-default default-tab-width 4)
(define-key sql-mode-map (kbd "RET") 'newline-and-indent)

How can I run this as a hook so it always works for sql mode?  I tried
the following to no avail (sans comments):

;; following doesn't
work
;;(add-hook 'sql-mode-
hook
;;        (lambda
()
;;          (define-key sql-mode-map (kbd "TAB") 'self-insert-
command)))

Thx!


reply via email to

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