(("\\.\\([Cc]\\|cc\\|cpp\\)\\'" . "C / C++ program")
nil
"#include \""
- ;; nop without latest cc-mode
- (and (fboundp 'c-companion-file)
- ;(file-readable-p (c-companion-file 'name))
- (file-name-nondirectory (c-companion-file 'name))) & ?\"
- | -10)
+ (let ((stem (file-name-sans-extension buffer-file-name)))
+ (cond ((file-exists-p (concat stem ".h"))
+ (file-name-nondirectory (concat stem ".h")))
+ ((file-exists-p (concat stem ".hh"))
+ (file-name-nondirectory (concat stem ".hh")))))
+ & ?\" | -10)
- ("[Mm]akefile\\'" . "makefile.inc")
+ (("[Mm]akefile\\'" . "Makefile") . "makefile.inc")
(html-mode . (lambda () (sgml-tag "html")))
;; Establish a default value for auto-insert-directory
(defcustom auto-insert-directory "~/insert/"
- "*Directory from which auto-inserted files are taken."
+ "*Directory from which auto-inserted files are taken.
+The value must be an absolute directory name;
+thus, on a GNU or Unix system, it must end in a slash."
:type 'directory
:group 'auto-insert)