Mercurial > hg > xemacs-beta
changeset 5205:fcdb86afcb91
merge
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Thu, 15 Apr 2010 20:14:08 -0500 |
parents | 912c34f1d7c8 (current diff) 733f067a73ce (diff) |
children | 39d74978fd32 |
files | |
diffstat | 2 files changed, 14 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Thu Apr 15 20:13:25 2010 -0500 +++ b/lisp/ChangeLog Thu Apr 15 20:14:08 2010 -0500 @@ -1,3 +1,13 @@ +2010-04-15 Aidan Kehoe <kehoea@parhasard.net> + + * files.el (hack-local-variables-prop-line) + (hack-one-local-variable): + Only attempt to call MODENAME-mode on encountering a + -*-MODENAME-*- line if the corresponding symbol has a function + binding, avoiding an error if, for example, opening a log file + with XLFDs and wild cards. Thanks for the bug report, Henrique + Martins! + 2010-04-09 Didier Verna <didier@xemacs.org> * hyper-apropos.el (hyper-apropos-get-doc): Use [not available]
--- a/lisp/files.el Thu Apr 15 20:13:25 2010 -0500 +++ b/lisp/files.el Thu Apr 15 20:14:08 2010 -0500 @@ -2044,7 +2044,7 @@ ;; Without this guard, `normal-mode' would potentially run ;; the major mode function twice: once via `set-auto-mode' ;; and once via `hack-local-variables'. - (if (not (eq mode major-mode)) + (if (and (not (eq mode major-mode)) (fboundp mode)) (funcall mode)) )) (set-any-p @@ -2091,8 +2091,9 @@ "\"Set\" one variable in a local variables spec. A few variable names are treated specially." (cond ((eq var 'mode) - (funcall (intern (concat (downcase (symbol-name val)) - "-mode")))) + (and (fboundp (setq val (intern (concat (downcase (symbol-name val)) + "-mode")))) + (funcall val))) ((eq var 'coding) ;; We have already handled coding: tag in set-auto-coding. nil)