Mark Diekhans
b024d9f02d
Make last-resort backup file in .emacs.d (Bug#6953).
...
* lisp/files.el (backup-buffer): Make last-resort backup file in
.emacs.d.
* lisp/subr.el (locate-user-emacs-file): If .emacs.d does not exist,
make it with permission 700.
* doc/emacs/files.texi (Backup Names): Document the new location of the
last-resort backup file.
2011-01-14 21:32:19 -05:00
Eli Zaretskii
4320be4251
Fix bug #7777 with documentation of directory-abbrev-alist.
...
lisp/files.el (directory-abbrev-alist): Doc fix.
doc/lispref/files.texi (Directory Names): Explain why FROM in
directory-abbrev-alist should begin with \`.
2011-01-07 17:55:13 +02:00
Stefan Monnier
2a8a455e77
* lisp/files.el (file-local-variables-alist): Make permanent-local.
...
Fixes: debbugs:7767
2011-01-01 22:57:26 -05:00
W. Martin Borgert
11cb1e35ff
* lisp/files.el (auto-mode-alist): Handle .dbk (DocBook) with xml-mode.
...
* etc/schema/schemas.xml: Handle *.dbk as DocBook.
2010-12-04 16:45:17 -05:00
Eli Zaretskii
2472c214a6
Fix bug #4674 with UNCs in file-relative-name.
...
files.el (file-relative-name): Handle UNC file names on DOS/Windows.
Also fixes bug#4673.
2010-12-04 14:52:04 +02:00
Stefan Monnier
acef0722fc
* lisp/files.el (safe-local-variable-p): Gracefully handle errors.
...
* lisp/emacs-lisp/bytecomp.el (byte-compile-warnings): Simplify the
safety predicate.
2010-11-11 17:19:01 -05:00
Michael Albinus
6ce78fdc20
* files.el (backup-by-copying-when-mismatch): Make it a buffer local
...
variable (permanent-local).
* net/tramp.el (tramp-handle-insert-file-contents): Do not set
`permanent-local' property for `(backup-by-copying-when-mismatch'.
2010-11-06 15:04:23 +01:00
Alexander Klimov
3fa0dc8f4d
* doc/lispref/files.texi (Directory Names): Use \` rather than ^.
...
* lisp/files.el (directory-abbrev-alist): Use \` as default regexp.
2010-09-06 00:03:56 +02:00
Kenichi Handa
f3cc64f808
files.el: Add word-wrap as safe local variable.
2010-08-18 17:07:58 +09:00
Drew Adams
949544ed26
Backport from trunk: Fix bug#6298.
2010-05-31 17:24:46 +02:00
Chong Yidong
99833607e0
* files.el (copy-directory): Handle symlinks (Bug#5982).
2010-04-20 18:28:26 -04:00
Wilson Snyder
5f8d2ce0f8
(auto-mode-alist): Accept more verilog file patterns.
2010-03-11 08:25:46 -08:00
Chong Yidong
8c3e96d2f0
Fix save-excursion warning in files.el.
...
* files.el (recover-session-finish): Use with-current-buffer instead of save-excursion.
2010-02-27 20:11:15 -05:00
Chong Yidong
f95a5fd02f
* files.el (hack-local-variables-filter): For eval forms, also
...
check safe-local-variable-p (Bug#5636).
2010-02-24 10:30:49 -05:00
Chong Yidong
50c58e2725
* files.el (directory-listing-before-filename-regexp): Use
...
stricter matching for iso-style dates, to avoid false matches with
date-like filenames (Bug#5597).
2010-02-21 16:12:46 -05:00
Michael Albinus
ecbaeb7bf5
* files.el (insert-directory): When WILDCARD-REGEXP and
...
FULL-DIRECTORY-P are nil, insert the file entry instead of the
whole directory. (Bug#5551)
* net/ange-ftp.el (ange-ftp-insert-directory): Insert " " for
dired's alignment sanity. (Bug#5516)
2010-02-14 10:23:52 +01:00
Chong Yidong
1d78a74696
* lisp/files.el (delete-directory): Fix typo in last change.
2010-01-26 22:36:36 -05:00
Chong Yidong
8b0e68ea3f
Fix delete-directory recursion behavior for trashing (Bug#5436).
...
* files.el (delete-directory): Handle moving to trash without first doing recursion (Bug#5436).
2010-01-26 22:17:23 -05:00
Juanma Barranquero
4963739e1d
Fix typos in docstrings.
2010-01-17 03:25:53 +01:00
Glenn Morris
114f9c9679
Add 2010 to copyright years.
2010-01-13 00:35:10 -08:00
Michael Albinus
b8b45afc52
* files.el (copy-directory): Compute target for recursive
...
directories with identical names. (Bug#5343)
2010-01-12 22:59:05 +01:00
Chong Yidong
9bbe0828a0
* lisp/files.el (minibuffer-with-setup-hook): Doc fix (Bug#5149).
2010-01-01 15:03:37 -05:00
Michael Albinus
1f3611c61a
* files.el (file-expand-wildcards): In case of remote files, check
...
only local file name part for wildcards. Provide feature 'files
and subfeature 'remote-wildcards. (Bug#5198)
* net/tramp.el (tramp-handle-file-remote-p): Expand file name only
if there is already an established connection.
(tramp-advice-file-expand-wildcards): Remove it.
* net/tramp-compat.el (top): Autoload `tramp-handle-file-remote-p'.
(tramp-advice-file-expand-wildcards): Moved from tramp.el.
Activate advice for older GNU Emacs versions. (Bug#5237)
2009-12-17 13:18:03 +00:00
Juri Linkov
cfb54897c9
Fix regression from 23.1 to allow multiple modes in Local Variables.
...
* files.el (hack-local-variables-filter): While ignoring duplicates,
don't take `mode' into account.
(hack-local-variables-filter, hack-dir-local-variables): Don't
remove duplicate `mode' from local-variables-alist (like `eval').
2009-12-17 01:18:14 +00:00
Juri Linkov
7d371eac64
Provide additional default values (file name at point or at the
...
current Dired line) via M-n for file reading minibuffers. (Bug#5010)
* minibuffer.el (read-file-name-defaults): New function.
(read-file-name): Reset `minibuffer-default' to nil when
it duplicates initial input `insdef'.
Bind `minibuffer-default-add-function' to lambda that
calls `read-file-name-defaults' in `minibuffer-selected-window'.
(minibuffer-insert-file-name-at-point): New command.
* files.el (file-name-at-point-functions): New defcustom.
(find-file-default): Remove defvar.
(find-file-read-args): Don't use `find-file-default'.
Move `minibuffer-with-setup-hook' that sets `minibuffer-default'
to `read-file-name'.
(find-file-literally): Use `read-file-name' with
`confirm-nonexistent-file-or-buffer'.
* ffap.el (ffap-guess-file-name-at-point): New autoloaded function.
* dired.el (dired-read-dir-and-switches):
Move `minibuffer-with-setup-hook' that sets `minibuffer-default'
to `read-file-name'.
(dired-file-name-at-point): New function.
(dired-mode): Add hook `dired-file-name-at-point' to
`file-name-at-point-functions'.
2009-11-25 17:11:29 +00:00
Stefan Monnier
7fdbcd8387
* x-dnd.el (x-dnd-maybe-call-test-function):
...
* window.el (split-window-vertically):
* whitespace.el (whitespace-help-on):
* vc-rcs.el (vc-rcs-consult-headers):
* userlock.el (ask-user-about-lock-help)
(ask-user-about-supersession-help):
* type-break.el (type-break-force-mode-line-update):
* time-stamp.el (time-stamp-conv-warn):
* terminal.el (te-set-output-log, te-more-break, te-filter)
(te-sentinel,terminal-emulator):
* term.el (make-term, term-exec, term-sentinel, term-read-input-ring)
(term-write-input-ring, term-check-source, term-start-output-log):
(term-display-buffer-line, term-dynamic-list-completions):
(term-ansi-make-term, serial-term):
* subr.el (selective-display):
* strokes.el (strokes-xpm-to-compressed-string, strokes-decode-buffer)
(strokes-encode-buffer, strokes-xpm-for-compressed-string):
* speedbar.el (speedbar-buffers-tail-notes, speedbar-buffers-item-info)
(speedbar-reconfigure-keymaps, speedbar-add-localized-speedbar-support)
(speedbar-remove-localized-speedbar-support)
(speedbar-set-mode-line-format, speedbar-create-tag-hierarchy)
(speedbar-update-special-contents, speedbar-buffer-buttons-engine)
(speedbar-buffers-line-directory):
* simple.el (shell-command-on-region, append-to-buffer)
(prepend-to-buffer):
* shadowfile.el (shadow-save-todo-file):
* scroll-bar.el (scroll-bar-set-window-start, scroll-bar-drag-1)
(scroll-bar-maybe-set-window-start):
* sb-image.el (speedbar-image-dump):
* saveplace.el (save-place-alist-to-file, save-places-to-alist)
(load-save-place-alist-from-file):
* ps-samp.el (ps-print-message-from-summary):
* ps-print.el (ps-flush-output, ps-insert-file, ps-get-boundingbox)
(ps-background-image, ps-begin-job, ps-do-despool):
* ps-bdf.el (bdf-find-file, bdf-read-font-info):
* printing.el (pr-interface, pr-ps-file-print, pr-find-buffer-visiting)
(pr-ps-message-from-summary, pr-lpr-message-from-summary):
(pr-call-process, pr-file-list, pr-interface-save):
* novice.el (disabled-command-function)
(enable-command, disable-command):
* mouse.el (mouse-buffer-menu-alist):
* mouse-copy.el (mouse-kill-preserving-secondary):
* macros.el (kbd-macro-query):
* ledit.el (ledit-go-to-lisp, ledit-go-to-liszt):
* informat.el (batch-info-validate):
* ido.el (ido-copy-current-word, ido-initiate-auto-merge):
* hippie-exp.el (try-expand-dabbrev-visible):
* help-mode.el (help-make-xrefs):
* help-fns.el (describe-variable):
* generic-x.el (bat-generic-mode-run-as-comint):
* finder.el (finder-mouse-select):
* find-dired.el (find-dired-sentinel):
* filesets.el (filesets-file-close):
* files.el (list-directory):
* faces.el (list-faces-display, describe-face):
* facemenu.el (list-colors-display):
* ezimage.el (ezimage-image-association-dump, ezimage-image-dump):
* epg.el (epg--process-filter, epg-cancel):
* epa.el (epa--marked-keys, epa--select-keys, epa-display-info)
(epa--read-signature-type):
* emerge.el (emerge-copy-as-kill-A, emerge-copy-as-kill-B)
(emerge-file-names):
* ehelp.el (electric-helpify):
* ediff.el (ediff-regions-wordwise, ediff-regions-linewise):
* ediff-vers.el (rcs-ediff-view-revision):
* ediff-util.el (ediff-setup):
* ediff-mult.el (ediff-append-custom-diff):
* ediff-diff.el (ediff-exec-process, ediff-process-sentinel)
(ediff-wordify):
* echistory.el (Electric-command-history-redo-expression):
* dos-w32.el (find-file-not-found-set-buffer-file-coding-system):
* disp-table.el (describe-display-table):
* dired.el (dired-find-buffer-nocreate):
* dired-aux.el (dired-rename-subdir, dired-dwim-target-directory):
* dabbrev.el (dabbrev--same-major-mode-p):
* chistory.el (list-command-history):
* apropos.el (apropos-documentation):
* allout.el (allout-obtain-passphrase):
(allout-copy-exposed-to-buffer):
(allout-verify-passphrase): Use with-current-buffer.
2009-11-13 22:19:45 +00:00
Dan Nicolaescu
6d341a2a09
* textmodes/ispell.el (ispell-skip-region-alist):
...
* textmodes/css-mode.el (auto-mode-alist):
* progmodes/compile.el (auto-mode-alist):
* international/mule.el (ctext-non-standard-encodings-alist)
(ctext-non-standard-encodings-regexp):
* simple.el (shell-command-switch, text-read-only):
* replace.el (occur-mode-map):
* paths.el (rmail-file-name):
* jka-cmpr-hook.el (jka-compr-build-file-regexp):
* find-file.el (ff-special-constructs):
* files.el (file-name-handler-alist):
* composite.el: Purecopy strings.
2009-11-12 06:55:39 +00:00
Stefan Monnier
2db2f23269
(directory-abbrev-alist): Fix docstring.
2009-11-11 19:02:35 +00:00
Dan Nicolaescu
1e8780b173
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
...
(tex-dvi-print-command, tex-bibtex-command, tex-start-commands)
(tex-start-options, slitex-run-command, latex-run-command)
(tex-run-command, tex-directory):
* textmodes/ispell.el (ispell-html-skip-alists)
(ispell-tex-skip-alists, ispell-tex-skip-alists):
* textmodes/fill.el (adaptive-fill-first-line-regexp):
(adaptive-fill-regexp):
* textmodes/dns-mode.el (auto-mode-alist):
* progmodes/python.el (interpreter-mode-alist):
* progmodes/etags.el (tags-compression-info-list):
* progmodes/etags.el (tags-file-name):
* net/browse-url.el (browse-url-galeon-program)
(browse-url-firefox-program):
* mail/sendmail.el (mail-signature-file)
(mail-citation-prefix-regexp):
* international/mule-conf.el (eight-bit):
* international/latexenc.el (latex-inputenc-coding-alist):
* international/fontset.el (x-pixel-size-width-font-regexp):
* emacs-lisp/warnings.el (warning-type-format):
* emacs-lisp/trace.el (trace-buffer):
* emacs-lisp/lisp-mode.el (lisp-interaction-mode-map)
(emacs-lisp-mode-map):
* calendar/holidays.el (holiday-solar-holidays)
(holiday-bahai-holidays, holiday-islamic-holidays)
(holiday-christian-holidays, holiday-hebrew-holidays)
(hebrew-holidays-4, hebrew-holidays-3, hebrew-holidays-2)
(hebrew-holidays-1, holiday-oriental-holidays)
(holiday-general-holidays):
* x-dnd.el (x-dnd-known-types):
* tool-bar.el (tool-bar):
* startup.el (site-run-file):
* shell.el (shell-dumb-shell-regexp):
* rfn-eshadow.el (file-name-shadow-tty-properties)
(file-name-shadow-properties):
* paths.el (remote-shell-program, news-directory):
* mouse.el ([C-down-mouse-3]):
* menu-bar.el (menu-bar-tools-menu):
* jka-cmpr-hook.el (jka-compr-load-suffixes)
(jka-compr-mode-alist-additions, jka-compr-compression-info-list)
(jka-compr-compression-info-list):
* isearch.el (search-whitespace-regexp):
* image-file.el (image-file-name-extensions):
* find-dired.el (find-ls-option):
* files.el (directory-listing-before-filename-regexp)
(directory-free-space-args, insert-directory-program)
(list-directory-brief-switches, magic-fallback-mode-alist)
(magic-fallback-mode-alist, auto-mode-interpreter-regexp)
(automount-dir-prefix):
* faces.el (face-x-resources, x-font-regexp, x-font-regexp-head)
(x-font-regexp-slant, x-font-regexp-weight, face-x-resources)
(face-font-registry-alternatives, face-font-registry-alternatives)
(face-font-family-alternatives):
* facemenu.el (facemenu-add-new-face, facemenu-background-menu)
(facemenu-foreground-menu, facemenu-face-menu):
* epa-hook.el (epa-file-name-regexp):
* dnd.el (dnd-protocol-alist):
* textmodes/rst.el (auto-mode-alist):
* button.el (default-button): Purecopy strings.
2009-11-06 05:16:23 +00:00
Dan Nicolaescu
ca0a881a35
* puresize.h (BASE_PURESIZE): Increase to 1470000.
...
* lread.c (Fload): Purecopy the file name when building Vpreloaded_file_list.
* textmodes/ispell.el (ispell-skip-region-alist):
* international/mule-conf.el (eight-bit):
* international/fontset.el (font-encoding-alist):
* startup.el (pure-space-overflow-message):
* simple.el (overwrite-mode-textual, overwrite-mode-binary):
* paths.el (gnus-nntp-service, rmail-spool-directory)
(term-file-prefix):
* files.el (save-some-buffers-action-alist):
* cmuscheme.el (same-window-buffer-names):
* ielm.el (same-window-buffer-names):
* shell.el (same-window-buffer-names):
* mail/sendmail.el (same-window-buffer-names):
* progmodes/inf-lisp.el (same-window-buffer-names):
* bindings.el (mode-line-client)
(mode-line-column-line-number-mode-map):
* language/tibetan.el (tibetan-precomposition-rule-regexp)
(tibetan-precomposed-regexp): Purecopy string arguments.
2009-10-30 02:00:11 +00:00
Dan Nicolaescu
a7610c523c
* textmodes/tex-mode.el (tex-dvi-view-command)
...
(tex-show-queue-command, tex-open-quote):
* progmodes/ruby-mode.el (auto-mode-alist)
(interpreter-mode-alist): Purecopy strings.
* emacs-lisp/lisp-mode.el (emacs-lisp-mode-map): Purecopy item names.
* emacs-lisp/derived.el (define-derived-mode): Purecopy the doc
string for the hook, keymap and abbrev table.
* emacs-lisp/byte-run.el (make-obsolete): Purecopy the current name.
* x-dnd.el (x-dnd-xdnd-to-action):
* startup.el (fancy-startup-text, fancy-about-text): Change to
defconst from defvar.
* ps-print.el (ps-page-dimensions-database): Purecopy initial value.
* mouse.el (mouse-buffer-menu-mode-groups, x-fixed-font-alist):
Purecopy initialization strings.
* mail/sendmail.el (mail-header-separator)
(mail-personal-alias-file):
* mail/rmail.el (rmail-default-dont-reply-to-names)
(rmail-ignored-headers, rmail-retry-ignored-headers)
(rmail-highlighted-headers, rmail-secondary-file-directory)
(rmail-secondary-file-regexp):
* files.el (null-device, file-name-invalid-regexp)
(locate-dominating-stop-dir-regexp)
(inhibit-first-line-modes-regexps): Purecopy initialization
strings.
(interpreter-mode-alist): Use mapcar instead of mapc.
* buff-menu.el (Buffer-menu-mode-map): Purecopy name.
* bindings.el (mode-line-major-mode-keymap): Purecopy name.
(completion-ignored-extensions):
(debug-ignored-errors): Purecopy strings.
2009-10-26 06:43:36 +00:00
Chong Yidong
ab27682008
* files.el (delete-directory): Delete symlinks to directories with
...
delete-file (Bug#4739).
2009-10-24 20:30:44 +00:00
Stefan Monnier
528c56e2d1
* minibuffer.el (completion-table-with-terminator): Properly implement
...
boundaries, in case `terminator' appears in the suffix.
(completion--embedded-envvar-table): Don't return boundaries if
there's no valid completion. Simplify.
(completion-file-name-table): New completion table extracted from
completion--file-name-table.
(completion--file-name-table): Use it.
(read-file-name-predicate): Declare obsolete.
(read-file-name): Use the pred arg i.s.o read-file-name-predicate.
* vc-bzr.el (vc-bzr-revision-completion-table): Use the new
completion-file-name-table, and use the `pred' argument.
* files.el (locate-file-completion-table): Use the `pred' arg rather
than read-file-name-predicate.
(abbreviate-file-name): Use \` rather than ^ for BOS.
2009-10-21 20:03:57 +00:00
Michael Albinus
0e1f2ee62a
* files.el (directory-files-no-dot-files-regexp): New defconst.
...
(delete-directory): Use it.
(copy-directory): Use it. Remove parameter PRESERVE-UID-GID.
2009-10-05 07:44:01 +00:00
Michael Albinus
8e692050bd
* files.el (copy-directory): New defun.
2009-10-04 12:14:05 +00:00
Chong Yidong
e6e267fcba
* cedet/srecode/srt-mode.el (srecode-template-mode): Doc fix.
...
* files.el (auto-mode-alist): Add .srt and Project.ede.
* cedet/semantic.el (semantic-mode): Handle
srecode-template-mode-hook as well.
* cedet/srecode/template.el: Remove hook variable.
* cedet/ede/proj-comp.el: Require ede/pmake when compiling.
* cedet/ede.el (ede-target-forms-menu): Don't enable if no
projects exist.
* cedet/srecode/map.el (srecode-map-base-template-dir): Look for
templates in data-directory.
* cedet/ede/srecode.el (ede-srecode-setup): Use default templates
directory.
* cedet/semantic/util-modes.el (semantic-highlight-func-mode): Doc
fix.
* cedet/ede/proj-comp.el (ede-proj-makefile-insert-variables):
Only insert each variable once.
* cedet/ede/pmake.el (ede-pmake-insert-variable-once): New macro.
(ede-pmake-insert-variable-shared): Use it.
* cedet/ede/cpp-root.el (ede-preprocessor-map): Do not deref table
for lexical table iff table is nil.
2009-10-03 19:28:05 +00:00
Juanma Barranquero
32226619c5
Use called-interactively-p' instead of
interactive-p'.
2009-10-02 03:48:36 +00:00
Michael Albinus
96ad4c3575
* files.el (delete-directory): New defun. The original function
...
in fileio.c has been renamed to `delete-directory-internal'.
2009-10-01 15:04:22 +00:00
Stefan Monnier
7201bfbb31
(cd-absolute): Don't abbreviate-file-name (bug#4599).
2009-10-01 03:34:04 +00:00
Chong Yidong
561580e91b
* files.el (safe-local-eval-forms): Fix typo.
2009-09-29 23:57:17 +00:00
Chong Yidong
182b3bec08
* files.el (safe-local-eval-forms): Allow time-stamp in
...
before-save-hook (Bug#4554).
2009-09-25 22:04:07 +00:00
Juanma Barranquero
11ee8d90b2
* menu-bar.el (list-buffers-directory): Add docstring.
...
Make automatically buffer-local.
* dired.el (dired-mode):
* files.el (cd-absolute):
* pcvs.el (cvs-temp-buffer):
* pcvs-util.el (cvs-get-buffer-create):
* shell.el (shell-mode):
* vc-dir.el (vc-dir-mode):
Don't make `list-buffers-directory' buffer local.
2009-09-25 04:35:14 +00:00
Chong Yidong
e477ca8496
* nxml/nxml-mode.el: Alias xml-mode to nxml-mode.
...
* textmodes/sgml-mode.el: Remove xml-mode alias.
* files.el (auto-mode-alist, conf-mode-maybe)
(magic-fallback-mode-alist): Revert 2009-09-18 and 2009-09-21
changes.
2009-09-24 23:22:17 +00:00
Chong Yidong
91fdbd6fdc
* files.el (conf-mode-maybe, magic-fallback-mode-alist): Use
...
nxml-mode instead of xml-mode.
2009-09-21 22:12:28 +00:00
Chong Yidong
9a1337f9c5
* files.el (auto-mode-alist): Change default for XML files to nXML
...
mode (Bug#4169).
2009-09-18 18:42:16 +00:00
Stefan Monnier
adba8116c3
* mail/sendmail.el (send-mail-function):
...
* tooltip.el (tooltip-mode):
* simple.el (transient-mark-mode):
* rfn-eshadow.el (file-name-shadow-mode):
* frame.el (blink-cursor-mode):
* font-core.el (global-font-lock-mode):
* files.el (temporary-file-directory)
(small-temporary-file-directory, auto-save-file-name-transforms):
* epa-hook.el (auto-encryption-mode):
* composite.el (global-auto-composition-mode):
Use custom-initialize-delay.
* startup.el (command-line): Don't explicitly call
custom-reevaluate-setting for all the above vars.
* custom.el (custom-initialize-safe-set)
(custom-initialize-safe-default): Delete.
2009-09-13 00:52:55 +00:00
Juanma Barranquero
79f01fa76c
* files.el (top-level): Require `cl' when compiling.
2009-09-07 15:23:09 +00:00
Glenn Morris
448ecec304
(auto-mode-alist): Use delphi-mode for .dpr files.
2009-09-07 02:26:37 +00:00
Karl Fogel
049a231b91
* lisp/files.el (find-alternate-file): Run `kill-buffer-hook' manually
...
before killing the old buffer, since by the time `kill-buffer' is
run so many buffer variables have been set to nil that it may not
behave as expected. (Bug#4061)
2009-09-05 16:25:27 +00:00
Karl Fogel
ef7ef2a016
* lisp/files.el (find-alternate-file): If the old buffer is modified
...
and visiting a file, behave similarly to `kill-buffer' when killing
it, thus reverting to the pre-1.878 behavior; see
http://lists.gnu.org/archive/html/emacs-devel/2009-09/msg00101.html
for discussion. Also, consult `buffer-file-name' as a variable not
as a function, for consistency with the rest of the code.
2009-09-05 15:16:49 +00:00