From 0651c58534bea5442b211c0ae23c1430d9ba1a1c Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Thu, 15 Nov 2001 16:22:05 +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 7e98d055ea7..431b4e14912 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 Andre Spiegel * vc.el: Documentation fixes. diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el index b927a7019d4..c4eb40a8aea 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.43 $ +;; Ada Core Technologies's version: $Revision: 1.43.4.1 $ ;; 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.2