diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2013-09-11 08:36:59 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2013-09-11 08:36:59 -0400 |
commit | feeff482d80b9f37d083497b2d3a9fec8bc58757 (patch) | |
tree | dcc61bbcb07d66079cec28444c2486602f6a9b5b /lisp | |
parent | 71b28baa2be2a084c45a75383eea7eb93ce79db1 (diff) | |
download | emacs-feeff482d80b9f37d083497b2d3a9fec8bc58757.tar.gz emacs-feeff482d80b9f37d083497b2d3a9fec8bc58757.tar.bz2 emacs-feeff482d80b9f37d083497b2d3a9fec8bc58757.zip |
* lisp/files.el (set-auto-mode): Simplify a bit further.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 4 | ||||
-rw-r--r-- | lisp/files.el | 8 |
2 files changed, 7 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 89610870f10..f5c4ee1b19e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2013-09-11 Stefan Monnier <monnier@iro.umontreal.ca> + + * files.el (set-auto-mode): Simplify a bit further. + 2013-09-11 Glenn Morris <rgm@gnu.org> * files.el (interpreter-mode-alist): Remove \\` \\' parts. diff --git a/lisp/files.el b/lisp/files.el index 5d8fbda6154..85bbc8596be 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2679,11 +2679,9 @@ we don't actually set it to the same mode the buffer already has." (setq done (assoc-default (file-name-nondirectory mode) (mapcar (lambda (e) - (if (string-match-p "\\`\\\\`" (car e)) - e - (cons - (format "\\`%s\\'" (car e)) - (cdr e)))) + (cons + (format "\\`%s\\'" (car e)) + (cdr e))) interpreter-mode-alist) #'string-match-p)) ;; If we found an interpreter mode to use, invoke it now. |