changeset 41082:6204eb16d008

(ada-add-extensions): Quote regexp special characters and append anchor to pattern added to auto-mode-alist.
author Andreas Schwab <schwab@suse.de>
date Thu, 15 Nov 2001 15:49:18 +0000
parents ae0bef8a3f2f
children f7b5ea29283e
files lisp/progmodes/ada-mode.el
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/ada-mode.el	Thu Nov 15 15:22:42 2001 +0000
+++ b/lisp/progmodes/ada-mode.el	Thu Nov 15 15:49:18 2001 +0000
@@ -7,7 +7,7 @@
 ;;      Markus Heritsch <Markus.Heritsch@studbox.uni-stuttgart.de>
 ;;      Emmanuel Briot  <briot@gnat.com>
 ;; Maintainer: Emmanuel Briot <briot@gnat.com>
-;; Ada Core Technologies's version:   $Revision: 1.44 $
+;; Ada Core Technologies's version:   $Revision: 1.45 $
 ;; Keywords: languages ada
 
 ;; This file is part of GNU Emacs.
@@ -937,8 +937,10 @@
         (setcdr tmp (list (cons body (cadr tmp))))
       (add-to-list 'ada-other-file-alist (list reg (list body)))))
 
-  (add-to-list 'auto-mode-alist (cons spec 'ada-mode))
-  (add-to-list 'auto-mode-alist (cons body 'ada-mode))
+  (add-to-list 'auto-mode-alist
+	       (cons (concat (regexp-quote spec) "\\'") 'ada-mode))
+  (add-to-list 'auto-mode-alist
+	       (cons (concat (regexp-quote body) "\\'") 'ada-mode))
 
   (add-to-list 'ada-spec-suffixes spec)
   (add-to-list 'ada-body-suffixes body)