From: Andreas Schwab Date: Thu, 15 Nov 2001 15:50:10 +0000 (+0000) Subject: (ada-add-extensions): Quote regexp special X-Git-Tag: ttn-vms-21-2-B4~18541 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1997815f8b9a29dff56e7479cd90e315c962e6e0;p=emacs.git (ada-add-extensions): Quote regexp special characters and append anchor to pattern added to auto-mode-alist. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b17cc6fae70..b3c58ef4df9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2001-11-15 Andreas Schwab + + * progmodes/ada-mode.el (ada-add-extensions): Quote regexp special + characters and append anchor to pattern added to auto-mode-alist. + 2001-11-15 Stefan Monnier * server.el (server-process-filter): Run pore/post-comment-hook diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el index 85530df2284..4d29dd1650a 100644 --- a/lisp/progmodes/ada-mode.el +++ b/lisp/progmodes/ada-mode.el @@ -7,7 +7,7 @@ ;; Markus Heritsch ;; Emmanuel Briot ;; Maintainer: Emmanuel Briot -;; 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 @@ name" (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)