comparison lisp/autoinsert.el @ 42161:18516f8e5cff

(auto-insert-alist): Redo finding C and C++ headers. Add a DESCRIPTION for the makefile item.
author Richard M. Stallman <rms@gnu.org>
date Tue, 18 Dec 2001 19:37:37 +0000
parents 45cb6948fefa
children 9b2201ff0db7
comparison
equal deleted inserted replaced
42160:530136f9f1b9 42161:18516f8e5cff
101 _ "\n\n#endif") 101 _ "\n\n#endif")
102 102
103 (("\\.\\([Cc]\\|cc\\|cpp\\)\\'" . "C / C++ program") 103 (("\\.\\([Cc]\\|cc\\|cpp\\)\\'" . "C / C++ program")
104 nil 104 nil
105 "#include \"" 105 "#include \""
106 ;; nop without latest cc-mode 106 (let ((stem (file-name-sans-extension buffer-file-name)))
107 (and (fboundp 'c-companion-file) 107 (cond ((file-exists-p (concat stem ".h"))
108 ;(file-readable-p (c-companion-file 'name)) 108 (file-name-nondirectory (concat stem ".h")))
109 (file-name-nondirectory (c-companion-file 'name))) & ?\" 109 ((file-exists-p (concat stem ".hh"))
110 | -10) 110 (file-name-nondirectory (concat stem ".hh")))))
111 111 & ?\" | -10)
112 ("[Mm]akefile\\'" . "makefile.inc") 112
113 (("[Mm]akefile\\'" . "Makefile") . "makefile.inc")
113 114
114 (html-mode . (lambda () (sgml-tag "html"))) 115 (html-mode . (lambda () (sgml-tag "html")))
115 116
116 (plain-tex-mode . "tex-insert.tex") 117 (plain-tex-mode . "tex-insert.tex")
117 (bibtex-mode . "tex-insert.tex") 118 (bibtex-mode . "tex-insert.tex")