/[emacs]/emacs/lispref/variables.texi
ViewVC logotype

Diff of /emacs/lispref/variables.texi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.64 by lektu, Wed Jun 15 23:10:54 2005 UTC revision 1.65 by rms, Sat Jun 18 13:58:02 2005 UTC
# Line 1722  be called later, or an expression that w Line 1722  be called later, or an expression that w
1722  visiting a file could take over your Emacs.  To prevent this, Emacs  visiting a file could take over your Emacs.  To prevent this, Emacs
1723  takes care not to allow to set such file local variables.  takes care not to allow to set such file local variables.
1724    
1725    For one thing, any variable whose name ends in @samp{-command},    For one thing, any variable whose name ends in any of
1726  @samp{-frame-alist}, @samp{-function}, @samp{-functions},  @samp{-command}, @samp{-frame-alist}, @samp{-function},
1727  @samp{-hook}, @samp{-hooks}, @samp{-form}, @samp{-forms}, @samp{-map},  @samp{-functions}, @samp{-hook}, @samp{-hooks}, @samp{-form},
1728  @samp{-map-alist}, @samp{-mode-alist}, @samp{-program}, or  @samp{-forms}, @samp{-map}, @samp{-map-alist}, @samp{-mode-alist},
1729  @samp{-predicate} cannot be given a file local value.  In general,  @samp{-program}, or @samp{-predicate} cannot be given a file local
1730  you should use such a name whenever it is appropriate for the  value.  In general, you should use such a name whenever it is
1731  variable's meaning.  The variables @samp{font-lock-keywords},  appropriate for the variable's meaning.  The variables
1732  @samp{font-lock-keywords-[0-9]}, and  @samp{font-lock-keywords}, @samp{font-lock-keywords} followed by a
1733  @samp{font-lock-syntactic-keywords} cannot be given file local values either.  digit, and @samp{font-lock-syntactic-keywords} cannot be given file
1734  These rules can be overridden by giving the variable's  local values either.  These rules can be overridden by giving the
1735  name a non-@code{nil} @code{safe-local-variable} property.  If one  variable's name a non-@code{nil} @code{safe-local-variable} property.
1736  gives it a @code{safe-local-variable} property of @code{t}, then one  If one gives it a @code{safe-local-variable} property of @code{t},
1737  can give the variable any file local value.  One can also give any  then one can give the variable any file local value.  One can also
1738  symbol, including the above, a @code{safe-local-variable} property  give any symbol, including the above, a @code{safe-local-variable}
1739  that is a function taking exactly one argument.  In that case, giving  property that is a function taking exactly one argument.  In that
1740  a variable with that name a file local value is only allowed if the  case, giving a variable with that name a file local value is only
1741  function returns non-@code{nil} when called with that value as  allowed if the function returns non-@code{nil} when called with that
1742  argument.  value as argument.
1743    
1744    In addition, any variable whose name has a non-@code{nil}    In addition, any variable whose name has a non-@code{nil}
1745  @code{risky-local-variable} property is also ignored.  So are all  @code{risky-local-variable} property is also ignored.  So are all
# Line 1822  same time using the macro @code{define-o Line 1822  same time using the macro @code{define-o
1822    
1823  @defmac define-obsolete-variable-alias obsolete-name current-name &optional when docstring  @defmac define-obsolete-variable-alias obsolete-name current-name &optional when docstring
1824  This macro marks the variable @var{obsolete-name} as obsolete and also  This macro marks the variable @var{obsolete-name} as obsolete and also
1825  makes it an alias for the variable @var{current-name}.  A typical call has  makes it an alias for the variable @var{current-name}.  It is
1826  the form:  equivalent to the following:
1827    
1828  @example  @example
1829  (define-obsolete-variable-alias 'old-var 'new-var "22.1" "Doc.")  (defvaralias @var{obsolete-name} @var{current-name} @var{docstring})
1830  @end example  (make-obsolete-variable @var{obsolete-name} @var{current-name} @var{when})
   
 @noindent  
 which is equivalent to the following two lines of code:  
   
 @example  
 (defvaralias 'oldvar 'newvar "Doc.")  
 (make-obsolete-variable 'old-var 'new-var "22.1")  
1831  @end example  @end example
1832  @end defmac  @end defmac
1833    

Legend:
Removed from v.1.64  
changed lines
  Added in v.1.65

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26