From a3610f0c69af6a5740fec5010b17bc4cfc86f708 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Wed, 19 Nov 2008 05:51:30 +0000 Subject: [PATCH] (auto-insert-alist): Don't use match data. --- lisp/ChangeLog | 7 ++++++- lisp/autoinsert.el | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 526b47d23c1..c619e861f1c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2008-11-19 Lute Kamstra + + * autoinsert.el (auto-insert-alist): Don't use match data. + 2008-11-19 Glenn Morris * progmodes/f90.el (f90-mode-map): Add some menu :help. @@ -15,7 +19,8 @@ * textmodes/ispell.el (ispell-dictionary-base-alist): Adjust to the case where the default dictionary is French, Spanish, younameit. - * window.el (window--frame-usable-p): Consider dedicated windows as usable. + * window.el (window--frame-usable-p): Consider dedicated windows + as usable. * files.el (confirm-nonexistent-file-or-buffer): Rename from find-file-confirm-nonexistent-file. diff --git a/lisp/autoinsert.el b/lisp/autoinsert.el index 2b4972bb11c..fb20a6c5b41 100644 --- a/lisp/autoinsert.el +++ b/lisp/autoinsert.el @@ -93,9 +93,9 @@ If this contains a %s, that will be replaced by the matching rule." (defcustom auto-insert-alist '((("\\.\\([Hh]\\|hh\\|hpp\\)\\'" . "C / C++ header") (upcase (concat (file-name-nondirectory - (substring buffer-file-name 0 (match-beginning 0))) + (file-name-sans-extension buffer-file-name)) "_" - (substring buffer-file-name (1+ (match-beginning 0))))) + (file-name-extension buffer-file-name))) "#ifndef " str \n "#define " str "\n\n" _ "\n\n#endif") -- 2.39.2