[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] Setting noweb mode in Emacs to edit pamphlet files
From: |
David MENTRE |
Subject: |
[Axiom-developer] Setting noweb mode in Emacs to edit pamphlet files |
Date: |
Wed, 16 Jul 2003 18:12:33 +0200 |
User-agent: |
Gnus/5.1002 (Gnus v5.10.2) Emacs/21.2 (gnu/linux) |
Hello,
Thanks to a Hubert Canon on fr.comp.applications.emacs, I have put the
following code in my .emacs. It allows to have a properly configured
noweb-mode when editing pamphlet files. The minor mode is set
accordingly to the type of file (C, lisp, makefile).
;; To have noweb mode automatically
(setq auto-mode-alist
(append '(("\\.pamphlet$" . noweb-mode)
) auto-mode-alist))
; many thanks to Hubert Canon
<address@hidden> for this code
(add-hook 'noweb-mode-hook 'my-noweb-set-mode-code)
(defun my-noweb-set-mode-code ()
(let* ((filename (file-name-nondirectory buffer-file-name))
(mode (cond ((string-match "^Makefile" filename) 'makefile-mode)
((string-match "\\.lisp\\.pamphlet" filename) 'lisp-mode)
((string-match "\\.lsp\\.pamphlet" filename) 'lisp-mode)
((string-match "\\.clisp\\.pamphlet" filename) 'lisp-mode)
((string-match "\\.c\\.pamphlet" filename) 'c-mode)
((string-match "\\.h\\.pamphlet" filename) 'c-mode)
(t 'fundamental-mode))))
(noweb-set-code-mode mode)))
;; To avoid converting tabulations into spaces using AUC TeX mode
(setq TeX-auto-untabify nil)
--
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Axiom-developer] Setting noweb mode in Emacs to edit pamphlet files,
David MENTRE <=