• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/emacs-93/emacs/lisp/

Lines Matching +defs:enable +defs:local +defs:variables

90 The choice of renaming or copying is controlled by the variables
97 ;; Do this so that local variables based on the file name
101 This variable is intended for use by making it local to a buffer.
102 But it is local only if you make it local.")
103 (put 'backup-inhibited 'permanent-local t)
120 Renaming may still be used (subject to control of other variables)
130 Renaming may still be used (subject to control of other variables)
140 (defvar backup-enable-predicate 'normal-backup-enable-predicate
142 Called with an absolute file name as argument, it returns t to enable backup.")
147 Automatically local in all buffers."
150 (make-variable-buffer-local 'buffer-offer-save)
165 (put 'find-file-visit-truename 'safe-local-variable 'boolean)
181 (make-variable-buffer-local 'buffer-file-number)
182 (put 'buffer-file-number 'permanent-local t)
189 (make-variable-buffer-local 'buffer-file-read-only)
253 (put 'version-control 'safe-local-variable
274 (put 'kept-old-versions 'safe-local-variable 'integerp)
281 (put 'kept-new-versions 'safe-local-variable 'integerp)
303 Those modes set `require-final-newline' to this value when you enable them.
385 ;;;It is not useful to make this a local variable.
386 ;;;(put 'find-file-not-found-hooks 'permanent-local t)
395 ;;;It is not useful to make this a local variable.
396 ;;;(put 'find-file-hooks 'permanent-local t)
399 The buffer's local variables (if any) will have been processed before the
412 So any buffer-local binding of this variable is discarded if you change
422 (put 'write-file-functions 'permanent-local t)
425 (defvar local-write-file-hooks nil)
426 (make-variable-buffer-local 'local-write-file-hooks)
427 (put 'local-write-file-hooks 'permanent-local t)
428 (make-obsolete-variable 'local-write-file-hooks 'write-file-functions "22.1")
446 (make-variable-buffer-local 'write-contents-functions)
450 (defcustom enable-local-variables t
451 "Control use of local variables in files you visit.
454 A value of t means file local variables specifications are obeyed
459 :safe means set the safe variables, and ignore the rest.
460 :all means set all variables, whether safe or not.
462 A value of nil means always ignore the file local variables.
466 this has no effect when `enable-local-variables' is \"something else\".)
472 always obeys file local variable specifications and the -*- line,
481 (defvar local-enable-local-variables t
482 "Like `enable-local-variables' but meant for buffer-local bindings.
484 If a major mode sets this to nil, buffer-locally, then any local
485 variables list in the file will be ignored.
490 (defcustom enable-local-eval 'maybe
491 "Control processing of the \"variable\" `eval' in a file's local variables.
493 A value of t means obey `eval' variables;
745 (defun file-local-copy (file)
747 Returns the name of the local copy, or nil, if FILE is directly
751 (let ((handler (find-file-name-handler file 'file-local-copy)))
753 (funcall handler 'file-local-copy file)
1549 meaning no coding system handling, format conversion, or local variables.
1554 meaning no coding system handling, format conversion, or local variables.
1580 meaning no coding system decoding, format conversion, or local variables.
1585 meaning no coding system decoding, format conversion, or local variables.
1606 (kill-local-variable 'find-file-literally)
1609 (kill-local-variable 'buffer-file-coding-system)
1610 (kill-local-variable 'cursor-type)
1613 (and (default-value 'enable-multibyte-characters)
1661 ;; this is a permanent local, the major mode won't eliminate it.
1662 (and backup-enable-predicate
1663 (not (funcall backup-enable-predicate buffer-file-name))
1665 (make-local-variable 'backup-inhibited)
1672 (make-local-variable 'find-file-literally)
1728 This is a permanent local.")
1729 (put 'find-file-literally 'permanent-local t)
1736 and local variable specifications in the file are ignored.
1758 Sets buffer mode, parses local variables.
1849 Also sets up any specified local variables of the file.
1850 Uses the visited file name, the -*- line, and the local variables spec.
1853 we may set up the file-specified mode and local variables,
1854 depending on the value of `enable-local-variables'.
1855 In addition, if `local-enable-local-variables' is nil, we do
1856 not set local variables (though we do notice a mode specified with -*-.)
1858 `enable-local-variables' is ignored if you run `normal-mode' interactively,
1860 in that case, this function acts as if `enable-local-variables' were t."
1863 (let ((enable-local-variables (or (not find-file) enable-local-variables)))
1866 (report-errors "File local-variables error: %s"
1867 (hack-local-variables)))
1869 ;; whatever file local variables are relevant to it.
2016 ;; *.cf, *.cfg, *.conf, *.config[.local|.de_DE.UTF8|...], */config
2140 (put 'magic-mode-alist 'risky-local-variable t)
2170 (put 'magic-fallback-mode-alist 'risky-local-variable t)
2185 It does not check for the `mode:' local variable in the
2186 Local Variables section of the file; for that, use `hack-local-variables'.
2188 If `enable-local-variables' is nil, this function does not check for a
2200 (and enable-local-variables
2371 ;;; Handling file local variables
2373 (defvar ignored-local-variables
2374 '(ignored-local-variables safe-local-variable-values)
2375 "Variables to be ignored in a file's local variable spec.")
2377 (defvar hack-local-variables-hook nil
2378 "Normal hook run after processing a file's local variables specs.
2379 Major modes can use this to examine user-specified local variables
2382 (defcustom safe-local-variable-values nil
2389 (defcustom safe-local-eval-forms nil
2390 "Expressions that are considered safe in an `eval:' local variable.
2392 they appear in an `eval' local variable specification, without first
2398 ;; Risky local variables:
2399 (mapc (lambda (var) (put var 'risky-local-variable t))
2411 enable-local-eval
2412 enable-local-variables
2423 ignored-local-variables
2443 overriding-local-map
2444 overriding-terminal-local-map
2448 safe-local-variable-values
2449 safe-local-eval-forms
2457 ;; Safe local variables:
2459 ;; For variables defined by major modes, the safety declarations can go into
2460 ;; the major mode's file, since that will be loaded before file variables are
2463 ;; For variables defined by minor modes, put the safety declarations in the
2467 ;; ;;;###autoload(put 'variable 'safe-local-variable 'stringp)
2469 ;; Otherwise, when Emacs visits a file specifying that local variable, the
2472 ;; For variables defined in the C source code the declaration should go here:
2475 (put (car pair) 'safe-local-variable (cdr pair)))
2485 (put 'c-set-style 'safe-local-eval-function t)
2487 (defun hack-local-variables-confirm (vars unsafe-vars risky-vars)
2493 (offer-save (and (eq enable-local-variables t) unsafe-vars))
2498 (set (make-local-variable 'cursor-type) nil)
2501 (insert "The local variables list in " name
2504 ", and variables that are risky (**)."
2507 (insert "The local variables list in " name
2508 "\ncontains variables that are risky (**).")
2509 (insert "A local variables list is specified in " name ".")))
2511 y -- to apply the local variables list.
2512 n -- to ignore the local variables list.")
2515 ! -- to apply the local variables list, and permanently mark these
2561 (add-to-list 'safe-local-variable-values elt))
2568 'safe-local-variable-values
2569 safe-local-variable-values))))
2575 (defun hack-local-variables-prop-line (&optional mode-only)
2576 "Return local variables specified in the -*- line.
2631 (defun hack-local-variables (&optional mode-only)
2632 "Parse and put into effect this buffer's local variables spec.
2635 (let ((enable-local-variables
2636 (and local-enable-local-variables enable-local-variables))
2638 (when (or mode-only enable-local-variables)
2639 (setq result (hack-local-variables-prop-line mode-only))
2640 ;; Look for "Local variables:" line in last page.
2648 ;; suffix is what comes after "local variables:" in its line.
2649 ;; prefix is what comes before "local variables:" in its line.
2670 (error "Local variables list is not properly terminated"))
2682 (error "Local variables entry is missing the prefix"))
2687 (error "Local variables entry is missing the suffix"))
2696 (if (eolp) (error "Missing colon in local variables entry"))
2717 ;; We've read all the local variables. Now, return whether the
2719 ;; variables (if MODE-ONLY is nil.)
2722 (dolist (ignored ignored-local-variables)
2724 (if (null enable-local-eval)
2728 ;; Find those variables that we may want to save to
2729 ;; `safe-local-variable-values'.
2736 (or (eq enable-local-eval t)
2737 (hack-one-local-variable-eval-safep
2739 (safe-local-variable-p var val)
2740 (and (risky-local-variable-p var val)
2743 (if (eq enable-local-variables :safe)
2744 ;; If caller wants only the safe variables,
2749 (hack-one-local-variable (car elt) (cdr elt))))
2752 (if (or (and (eq enable-local-variables t)
2755 (eq enable-local-variables :all)
2756 (hack-local-variables-confirm
2759 (hack-one-local-variable (car elt) (cdr elt)))))))
2760 (run-hooks 'hack-local-variables-hook)))))
2762 (defun safe-local-variable-p (sym val)
2763 "Non-nil if SYM is safe as a file-local variable with value VAL.
2767 `safe-local-variable-values' user option.
2769 * The `safe-local-variable' property of SYM is a function that
2771 (or (member (cons sym val) safe-local-variable-values)
2772 (let ((safep (get sym 'safe-local-variable)))
2775 (defun risky-local-variable-p (sym &optional ignored)
2776 "Non-nil if SYM could be dangerous as a file-local variable.
2779 * Its `risky-local-variable' property is non-nil.
2789 (or (get sym 'risky-local-variable)
2795 (defun hack-one-local-variable-quotep (exp)
2798 (defun hack-one-local-variable-constantp (exp)
2802 (hack-one-local-variable-quotep exp)))
2804 (defun hack-one-local-variable-eval-safep (exp)
2809 (hack-one-local-variable-quotep (nth 1 exp))
2810 (hack-one-local-variable-quotep (nth 2 exp))
2821 (hack-one-local-variable-quotep val)
2824 (member exp safe-local-eval-forms)
2828 (let ((prop (get (car exp) 'safe-local-eval-function)))
2832 (unless (hack-one-local-variable-constantp arg)
2844 (defun hack-one-local-variable (var val)
2845 "Set local variable VAR with value VAL.
2859 ;; so it is risky to put them on with a local variable list.
2862 (set (make-local-variable var) val))))
2869 \(1) a local variables list or the `-*-' line specifies a major mode, or
2941 ;; that visit things that are not local files as if they were files.
2942 ;; Changing to visit an ordinary local file instead should flush the hook.
2943 (kill-local-variable 'write-file-functions)
2944 (kill-local-variable 'local-write-file-hooks)
2945 (kill-local-variable 'revert-buffer-function)
2946 (kill-local-variable 'backup-inhibited)
2951 (kill-local-variable 'vc-mode)
2953 ;; Since this is a permanent local, the major mode won't eliminate it.
2955 backup-enable-predicate
2956 (not (funcall backup-enable-predicate buffer-file-name))
2958 (make-local-variable 'backup-inhibited)
2984 ;; Don't change the mode if the local variable list specifies it.
2985 (hack-local-variables t)
2995 the default file name into the minibuffer to edit it, using \\<minibuffer-local-map>\\[next-history-element].
3223 This could be buffer-local to do something special for specific
3255 (defun normal-backup-enable-predicate (name)
3256 "Default `backup-enable-predicate' function.
3544 We don't want excessive versions piling up, so there are variables
3604 (make-variable-buffer-local 'save-buffer-coding-system)
3605 (put 'save-buffer-coding-system 'permanent-local t)
3683 (run-hook-with-args-until-success 'local-write-file-hooks)
3856 (make-variable-buffer-local 'buffer-save-without-query)
3957 (make-local-variable 'view-read-only)
4060 (put 'revert-buffer-function 'permanent-local t)
4066 (put 'revert-buffer-insert-file-contents-function 'permanent-local t)
4099 before reverting; that makes a difference if you have buffer-local
4176 (local-hook (when (local-variable-p 'after-revert-hook)
4211 (if (and (not enable-multibyte-characters)
4224 (kill-local-variable 'buffer-file-coding-system)
4240 (if local-hook
4241 (set (make-local-variable 'revert-buffer-internal-hook)
4242 local-hook)
4243 (kill-local-variable 'revert-buffer-internal-hook))
4328 (use-local-map (nconc (make-sparse-keymap) (current-local-map)))
4329 (define-key (current-local-map) "\C-c\C-c" 'recover-session-finish))
4708 Actions controlled by variables `list-directory-brief-switches'
4951 (and enable-multibyte-characters
5132 (when (and enable-multibyte-characters