X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/d7c9c71587e47ec81ed175514fbd6bbdce30bbca..bd8fadca2740ff8da308845199799641f25c3934:/lisp/files-x.el diff --git a/lisp/files-x.el b/lisp/files-x.el index c120c646e6..222141bd35 100644 --- a/lisp/files-x.el +++ b/lisp/files-x.el @@ -1,10 +1,11 @@ ;;; files-x.el --- extended file handling commands -;; Copyright (C) 2009 Free Software Foundation, Inc. +;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. ;; Author: Juri Linkov ;; Maintainer: FSF ;; Keywords: files +;; Package: emacs ;; This file is part of GNU Emacs. @@ -49,6 +50,7 @@ Intended to be used in the `interactive' spec of obarray (lambda (sym) (or (user-variable-p sym) + (get sym 'safe-local-variable) (memq sym '(mode eval coding unibyte)))) nil nil nil default nil)) (and (stringp variable) (intern variable)))) @@ -68,8 +70,7 @@ Intended to be used in the `interactive' spec of (format "Add %s with value: " variable)) obarray (lambda (sym) - (and (string-match-p "-mode\\'" (symbol-name sym)) - (not (string-match-p "-minor-mode\\'" (symbol-name sym))))) + (string-match-p "-mode\\'" (symbol-name sym))) nil nil nil default nil)) (and (stringp value) (intern (replace-regexp-in-string "-mode\\'" "" value)))) @@ -91,7 +92,8 @@ Intended to be used in the `interactive' spec of nil 'set-variable-value-history (format "%S" (cond ((eq variable 'unibyte) t) - (t (symbol-value variable)))))))))) + ((boundp variable) + (symbol-value variable)))))))))) (defun read-file-local-variable-mode () "Read per-directory file-local variable's mode using completion. @@ -354,7 +356,7 @@ If .dir-locals.el was not found and OP is not `delete' then create this file in the current directory. If OP is `delete' then delete all existing settings of VARIABLE -from the the MODE alist ignoring the input argument VALUE." +from the MODE alist ignoring the input argument VALUE." (catch 'exit (unless enable-local-variables (throw 'exit (message "Directory-local variables are disabled"))) @@ -450,7 +452,7 @@ from the the MODE alist ignoring the input argument VALUE." ;;;###autoload (defun copy-dir-locals-to-file-locals-prop-line () - "Copy directory-local variables to the the -*- line." + "Copy directory-local variables to the -*- line." (interactive) (dolist (elt dir-local-variables-alist) (add-file-local-variable-prop-line (car elt) (cdr elt)))) @@ -458,4 +460,6 @@ from the the MODE alist ignoring the input argument VALUE." (provide 'files-x) + +;; arch-tag: 949d263c-30a8-4b49-af26-cda97c7c5477 ;;; files-x.el ends here