aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2001-12-18 19:37:37 +0000
committerRichard M. Stallman2001-12-18 19:37:37 +0000
commitf6ec15321530f9fe630c35067587933ffbd8a6cf (patch)
treedf085be34d4e8548950467bc63e6a9d1dcb46792
parentb04dcf45eb30771531fe4507cf99c1c1549cb614 (diff)
downloademacs-f6ec15321530f9fe630c35067587933ffbd8a6cf.tar.gz
emacs-f6ec15321530f9fe630c35067587933ffbd8a6cf.zip
(auto-insert-alist): Redo finding C and C++ headers.
Add a DESCRIPTION for the makefile item.
-rw-r--r--lisp/autoinsert.el15
1 files changed, 8 insertions, 7 deletions
diff --git a/lisp/autoinsert.el b/lisp/autoinsert.el
index ae6e9863097..5ed3db56796 100644
--- a/lisp/autoinsert.el
+++ b/lisp/autoinsert.el
@@ -103,13 +103,14 @@ If this contains a %s, that will be replaced by the matching rule."
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