comparison lisp/files.el @ 83517:b6689e223e2f

Merged from emacs@sv.gnu.org Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-273 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-274 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-275 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-276 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-277 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-278 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-279 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-280 Update etc/MORE.STUFF. * emacs@sv.gnu.org/emacs--devo--0--patch-281 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-282 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-283 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-284 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-101 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-557
author Karoly Lorentey <lorentey@elte.hu>
date Wed, 17 May 2006 18:05:02 +0000
parents 1321f6cfb389 061c56c68707
children ab6ab63755f7
comparison
equal deleted inserted replaced
83516:1321f6cfb389 83517:b6689e223e2f
160 "*Non-nil means visit a file under its truename. 160 "*Non-nil means visit a file under its truename.
161 The truename of a file is found by chasing all links 161 The truename of a file is found by chasing all links
162 both at the file level and at the levels of the containing directories." 162 both at the file level and at the levels of the containing directories."
163 :type 'boolean 163 :type 'boolean
164 :group 'find-file) 164 :group 'find-file)
165 (put 'find-file-visit-truename 'safe-local-variable 'boolean)
165 166
166 (defcustom revert-without-query nil 167 (defcustom revert-without-query nil
167 "*Specify which files should be reverted without query. 168 "*Specify which files should be reverted without query.
168 The value is a list of regular expressions. 169 The value is a list of regular expressions.
169 If the file name matches one of these regular expressions, 170 If the file name matches one of these regular expressions,
247 :type '(choice (const :tag "Never" never) 248 :type '(choice (const :tag "Never" never)
248 (const :tag "If existing" nil) 249 (const :tag "If existing" nil)
249 (other :tag "Always" t)) 250 (other :tag "Always" t))
250 :group 'backup 251 :group 'backup
251 :group 'vc) 252 :group 'vc)
253 (put 'version-control 'safe-local-variable
254 '(lambda (x) (or (booleanp x) (equal x 'never))))
252 255
253 (defcustom dired-kept-versions 2 256 (defcustom dired-kept-versions 2
254 "*When cleaning directory, number of versions to keep." 257 "*When cleaning directory, number of versions to keep."
255 :type 'integer 258 :type 'integer
256 :group 'backup 259 :group 'backup
266 269
267 (defcustom kept-old-versions 2 270 (defcustom kept-old-versions 2
268 "*Number of oldest versions to keep when a new numbered backup is made." 271 "*Number of oldest versions to keep when a new numbered backup is made."
269 :type 'integer 272 :type 'integer
270 :group 'backup) 273 :group 'backup)
274 (put 'kept-old-versions 'safe-local-variable 'integerp)
271 275
272 (defcustom kept-new-versions 2 276 (defcustom kept-new-versions 2
273 "*Number of newest versions to keep when a new numbered backup is made. 277 "*Number of newest versions to keep when a new numbered backup is made.
274 Includes the new backup. Must be > 0" 278 Includes the new backup. Must be > 0"
275 :type 'integer 279 :type 'integer
276 :group 'backup) 280 :group 'backup)
281 (put 'kept-new-versions 'safe-local-variable 'integerp)
277 282
278 (defcustom require-final-newline nil 283 (defcustom require-final-newline nil
279 "*Whether to add a newline automatically at the end of the file. 284 "*Whether to add a newline automatically at the end of the file.
280 285
281 A value of t means do this only when the file is about to be saved. 286 A value of t means do this only when the file is about to be saved.
1890 ("\\.pro\\'" . idlwave-mode) 1895 ("\\.pro\\'" . idlwave-mode)
1891 ("\\.prolog\\'" . prolog-mode) 1896 ("\\.prolog\\'" . prolog-mode)
1892 ("\\.tar\\'" . tar-mode) 1897 ("\\.tar\\'" . tar-mode)
1893 ;; The list of archive file extensions should be in sync with 1898 ;; The list of archive file extensions should be in sync with
1894 ;; `auto-coding-alist' with `no-conversion' coding system. 1899 ;; `auto-coding-alist' with `no-conversion' coding system.
1895 ("\\.\\(arc\\|zip\\|lzh\\|zoo\\|[jew]ar\\|xpi\\)\\'" . archive-mode) 1900 ("\\.\\(arc\\|zip\\|lzh\\|lha\\|zoo\\|[jew]ar\\|xpi\\)\\'" . archive-mode)
1896 ("\\.\\(ARC\\|ZIP\\|LZH\\|ZOO\\|[JEW]AR\\|XPI\\)\\'" . archive-mode) 1901 ("\\.\\(ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\)\\'" . archive-mode)
1897 ("\\.\\(sx[dmicw]\\|odt\\)\\'" . archive-mode) ; OpenOffice.org 1902 ("\\.\\(sx[dmicw]\\|odt\\)\\'" . archive-mode) ; OpenOffice.org
1898 ;; Mailer puts message to be edited in 1903 ;; Mailer puts message to be edited in
1899 ;; /tmp/Re.... or Message 1904 ;; /tmp/Re.... or Message
1900 ("\\`/tmp/Re" . text-mode) 1905 ("\\`/tmp/Re" . text-mode)
1901 ("/Message[0-9]*\\'" . text-mode) 1906 ("/Message[0-9]*\\'" . text-mode)
2350 ;; For variables defined in the C source code the declaration should go here: 2355 ;; For variables defined in the C source code the declaration should go here:
2351 2356
2352 ;; FIXME: Some variables should be moved according to the rules above. 2357 ;; FIXME: Some variables should be moved according to the rules above.
2353 (mapc (lambda (pair) 2358 (mapc (lambda (pair)
2354 (put (car pair) 'safe-local-variable (cdr pair))) 2359 (put (car pair) 'safe-local-variable (cdr pair)))
2355 '((byte-compile-dynamic . booleanp) 2360 '((fill-column . integerp) ;; C source code
2356 (byte-compile-dynamic-docstrings . booleanp)
2357 (byte-compile-warnings . booleanp)
2358 (c-basic-offset . integerp)
2359 (c-file-style . stringp)
2360 (c-indent-level . integerp)
2361 (comment-column . integerp)
2362 (compile-command . string-or-null-p)
2363 (find-file-visit-truename . booleanp)
2364 (fill-column . integerp)
2365 (fill-prefix . string-or-null-p)
2366 (indent-tabs-mode . booleanp) ;; C source code 2361 (indent-tabs-mode . booleanp) ;; C source code
2367 (kept-old-versions . integerp) 2362 (left-margin . integerp) ;; C source code
2368 (kept-new-versions . integerp)
2369 (left-margin . integerp)
2370 (no-byte-compile . booleanp)
2371 (no-update-autoloads . booleanp) 2363 (no-update-autoloads . booleanp)
2372 (outline-regexp . string-or-null-p)
2373 (tab-width . integerp) ;; C source code 2364 (tab-width . integerp) ;; C source code
2374 (truncate-lines . booleanp) ;; C source code 2365 (truncate-lines . booleanp))) ;; C source code
2375 (version-control . symbolp)))
2376 2366
2377 (put 'c-set-style 'safe-local-eval-function t) 2367 (put 'c-set-style 'safe-local-eval-function t)
2378 2368
2379 (defun hack-local-variables-confirm (vars unsafe-vars risky-vars) 2369 (defun hack-local-variables-confirm (vars unsafe-vars risky-vars)
2380 (if noninteractive 2370 (if noninteractive
4113 (yes-or-no-p (format "Recover auto save file %s? " file-name))) 4103 (yes-or-no-p (format "Recover auto save file %s? " file-name)))
4114 (switch-to-buffer (find-file-noselect file t)) 4104 (switch-to-buffer (find-file-noselect file t))
4115 (let ((inhibit-read-only t) 4105 (let ((inhibit-read-only t)
4116 ;; Keep the current buffer-file-coding-system. 4106 ;; Keep the current buffer-file-coding-system.
4117 (coding-system buffer-file-coding-system) 4107 (coding-system buffer-file-coding-system)
4118 ;; Auto-saved file shoule be read with special coding. 4108 ;; Auto-saved file should be read with special coding.
4119 (coding-system-for-read 'auto-save-coding)) 4109 (coding-system-for-read 'auto-save-coding))
4120 (erase-buffer) 4110 (erase-buffer)
4121 (insert-file-contents file-name nil) 4111 (insert-file-contents file-name nil)
4122 (set-buffer-file-coding-system coding-system)) 4112 (set-buffer-file-coding-system coding-system))
4123 (after-find-file nil nil t)) 4113 (after-find-file nil nil t))