comparison lisp/files.el @ 91085:880960b70474

Merge from emacs--devo--0 Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-283
author Miles Bader <miles@gnu.org>
date Sun, 11 Nov 2007 00:56:44 +0000
parents 4bc33ffdda1a 77608327b2c8
children 53108e6cea98
comparison
equal deleted inserted replaced
91084:a4347a111894 91085:880960b70474
448 (define-obsolete-variable-alias 'write-contents-hooks 448 (define-obsolete-variable-alias 'write-contents-hooks
449 'write-contents-functions "22.1") 449 'write-contents-functions "22.1")
450 450
451 (defcustom enable-local-variables t 451 (defcustom enable-local-variables t
452 "Control use of local variables in files you visit. 452 "Control use of local variables in files you visit.
453 The value can be t, nil, :safe, or something else. 453 The value can be t, nil, :safe, :all, or something else.
454 454
455 A value of t means file local variables specifications are obeyed 455 A value of t means file local variables specifications are obeyed
456 if all the specified variable values are safe; if any values are 456 if all the specified variable values are safe; if any values are
457 not safe, Emacs queries you, once, whether to set them all. 457 not safe, Emacs queries you, once, whether to set them all.
458 \(When you say yes to certain values, they are remembered as safe.) 458 \(When you say yes to certain values, they are remembered as safe.)
1962 ("\\.te?xt\\'" . text-mode) 1962 ("\\.te?xt\\'" . text-mode)
1963 ("\\.[tT]e[xX]\\'" . tex-mode) 1963 ("\\.[tT]e[xX]\\'" . tex-mode)
1964 ("\\.ins\\'" . tex-mode) ;Installation files for TeX packages. 1964 ("\\.ins\\'" . tex-mode) ;Installation files for TeX packages.
1965 ("\\.ltx\\'" . latex-mode) 1965 ("\\.ltx\\'" . latex-mode)
1966 ("\\.dtx\\'" . doctex-mode) 1966 ("\\.dtx\\'" . doctex-mode)
1967 ("\\.org\\'" . org-mode)
1967 ("\\.el\\'" . emacs-lisp-mode) 1968 ("\\.el\\'" . emacs-lisp-mode)
1968 ("\\.\\(scm\\|stk\\|ss\\|sch\\)\\'" . scheme-mode) 1969 ("\\.\\(scm\\|stk\\|ss\\|sch\\)\\'" . scheme-mode)
1969 ("\\.l\\'" . lisp-mode) 1970 ("\\.l\\'" . lisp-mode)
1970 ("\\.li?sp\\'" . lisp-mode) 1971 ("\\.li?sp\\'" . lisp-mode)
1971 ("\\.[fF]\\'" . fortran-mode) 1972 ("\\.[fF]\\'" . fortran-mode)
2819 (push elt unsafe-vars)))) 2820 (push elt unsafe-vars))))
2820 (if (eq enable-local-variables :safe) 2821 (if (eq enable-local-variables :safe)
2821 ;; If caller wants only the safe variables, 2822 ;; If caller wants only the safe variables,
2822 ;; install only them. 2823 ;; install only them.
2823 (dolist (elt result) 2824 (dolist (elt result)
2824 (unless (or (memq (car elt) unsafe-vars) 2825 (unless (or (member elt unsafe-vars)
2825 (memq (car elt) risky-vars)) 2826 (member elt risky-vars))
2826 (hack-one-local-variable (car elt) (cdr elt)))) 2827 (hack-one-local-variable (car elt) (cdr elt))))
2827 ;; Query, except in the case where all are known safe 2828 ;; Query, except in the case where all are known safe
2828 ;; if the user wants no quuery in that case. 2829 ;; if the user wants no quuery in that case.
2829 (if (or (and (eq enable-local-variables t) 2830 (if (or (and (eq enable-local-variables t)
2830 (null unsafe-vars) 2831 (null unsafe-vars)