From 1997815f8b9a29dff56e7479cd90e315c962e6e0 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Thu, 15 Nov 2001 15:50:10 +0000 Subject: [PATCH] (ada-add-extensions): Quote regexp special characters and append anchor to pattern added to auto-mode-alist. --- lisp/ChangeLog | 5 +++++ lisp/progmodes/ada-mode.el | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) 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) -- 2.39.5