From: Richard M. Stallman Date: Tue, 2 Apr 2002 23:14:41 +0000 (+0000) Subject: (hack-one-local-variable): Clear text props from string value. X-Git-Tag: ttn-vms-21-2-B4~15816 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=87a6a5d8d4ca5c5dcd8c9c11fc279dfd61c62f0f;p=emacs.git (hack-one-local-variable): Clear text props from string value. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b5cc06f5f66..75cd7982716 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2002-04-02 Richard M. Stallman + + * files.el (hack-one-local-variable): + Clear text props from string value. + 2002-04-02 Mike Williams * textmodes/sgml-mode.el (sgml-close-tag): Rename from diff --git a/lisp/files.el b/lisp/files.el index 0c9a3947b8c..8516212cdd7 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1994,6 +1994,11 @@ is considered risky." (message "Ignoring `eval:' in the local variables list"))) ;; Ordinary variable, really set it. (t (make-local-variable var) + ;; Make sure the string has no text properties. + ;; Some text properties can get evaluated in various ways, + ;; so it is risky to put them on with a local variable list. + (if (stringp val) + (set-text-properties 0 (length val) nil val)) (set var val))))