Glenn Morris
f4f1380dea
* lisp/files.el (auto-mode-alist): Use conf mode for gitconfig, hgrc.
...
Fixes: debbugs:19506
2015-04-18 18:37:01 -07:00
Artur Malabarba
5fb807efcd
* lisp/files.el: Only message when saving if save-silently is nil
...
(save-silently): New variable.
(files--message): New function.
(find-file-noselect, save-buffer, basic-save-buffer)
(basic-save-buffer-2, save-some-buffers, not-modified)
(append-to-file): Use them.
2015-04-12 16:16:05 +01:00
Artur Malabarba
ad36067a1e
* lisp/files.el: Don't message when nothing happened
...
(save-some-buffers, basic-save-buffer): Before messaging to say
"nothing was saved" check if (called-interactively-p 'any).
2015-04-12 13:45:30 +01:00
Stefan Monnier
d60dbd81be
Fixes: debbugs:20257
...
* lisp/files.el (set-visited-file-name): Clear auto-save if nil.
2015-04-07 14:56:54 -04:00
Pete Williamson
b79bcfd34f
Fix .emacs and .emacs.d/init file recursion problem for NaCl
...
* files.el (file-truename): Add NaCl to the exception list ms-dos uses.
2015-04-04 20:19:21 -07:00
Sam Steingold
a0edb0160b
`auto-save-list-file-prefix' can be a directory name
...
* lisp/files.el (recover-session): Handle `auto-save-list-file-prefix'
being a directory (empty non-directory part).
2015-02-23 09:13:31 -05:00
Kelly Dean
72f7eded97
Use user-error where error is inappropriate
...
* help-mode.el (help-go-back, help-go-forward, help-follow):
* simple.el (yank-pop, pop-to-mark-command, exchange-point-and-mark):
* winner.el (winner-redo):
* windmove.el (windmove-do-window-select):
* register.el (jump-to-register, increment-register, insert-register)
(append-to-register, prepend-to-register):
* files.el (find-alternate-file, abort-if-file-too-large, write-file)
(set-visited-file-name):
* emacs-lisp/lisp.el (kill-backward-up-list):
Use user-error instead of error. (Bug#14480)
2015-02-18 16:36:22 -02:00
Kelly Dean
8338e4420d
lisp/files.el (insert-file-contents-literally): Fix typo
2015-02-17 22:16:24 -02:00
Michal Nazarewicz
5a971bd302
files.el: avoid asking whether to kill Emacs multiple times
...
* lisp/files.el (save-buffers-kill-emacs): If `confirm-kill-emacs' is
set, but user has just been asked whether they really want to kill Emacs
(for example with a ‘Modified buffers exist; exit anyway?’ prompt) , do
not ask them for another confirmation.
2015-01-30 11:43:04 +01:00
Fabián Ezequiel Gallina
d7a89815b6
Merge from origin/emacs-24
...
d279e66
Fix assertion violations in try_window_id (Bug#19511)
031eadc
Fix dired quoting bug with "Hit`N`Hide"
5981b4b
More doc fixes for bug#19502 -- make documentation less X-specific.
143516c
src/emacs.c (syms_of_emacs) <system-configuration>: Doc fix. (Bug#19502)
2015-01-28 00:59:34 -03:00
Paul Eggert
8dd58a2d1f
Don't downcase system diagnostics' first letters
...
* etc/NEWS: Document this.
* lisp/emacs-lisp/bytecomp.el (byte-compile-file):
* lisp/ffap.el (find-file-at-point):
* lisp/files.el (insert-file-1):
* lisp/net/ange-ftp.el (ange-ftp-barf-if-not-directory)
(ange-ftp-copy-file-internal):
* lisp/progmodes/etags.el (visit-tags-table):
* lisp/url/url-dav.el (url-dav-delete-directory, url-dav-delete-file)
(url-dav-directory-files):
Keep diagnostics consistent with system's.
* lisp/erc/erc-dcc.el (erc-dcc-server):
* lisp/ffap.el (ffap-machine-p):
Ignore case while comparing diagnostics.
* src/fileio.c (report_file_errno): Don't downcase, and simplify.
Fixes: bug#19642
2015-01-21 20:29:42 -08:00
Ivan Shmakov
e000ff30b4
Fix dir-locals handling for non-file buffers.
...
* lisp/files.el (dir-locals-collect-variables): Use default-directory
in place of the file name while working on non-file buffers, just
like hack-dir-local-variables already does.
Fixes: debbugs:19140
2015-01-17 19:33:50 +00:00
Ivan Shmakov
3e824b05af
Avoid mapcar in two cases in files.el.
...
* lisp/files.el (find-file-other-window, find-file-other-frame):
Use mapc instead of mapcar.
Fixes: debbugs:18175
2015-01-17 19:33:08 +00:00
Lars Magne Ingebrigtsen
22294ae511
Minor directory-files-recursively touch-up
...
* files.el (directory-files-recursively): Don't use the word
"path" for a file name.
2015-01-16 01:12:52 +01:00
Michael Albinus
38bb639d55
* files.el (directory-files-recursively): Do not include remote file names.
2015-01-11 15:58:06 +01:00
Glenn Morris
ffa8603902
* lisp/files.el (file-tree-walk): Remove; of unknown authorship.
...
* etc/NEWS: Remove entry.
Fixes: debbugs:19325
2015-01-07 20:52:24 -08:00
Paul Eggert
031eadcbed
Fix dired quoting bug with "HitN
Hide"
...
Fixes Bug#19498.
* files.el (shell-quote-wildcard-pattern): Also quote "`".
2015-01-04 13:45:44 -08:00
Paul Eggert
cd2d58c1c8
Less 'make' chatter in batch mode
...
* admin/unidata/unidata-gen.el (unidata-gen-files):
* lisp/emacs-lisp/autoload.el (autoload-generate-file-autoloads):
* lisp/emacs-lisp/bytecomp.el (byte-compile-file):
* lisp/files.el (save-buffer, basic-save-buffer):
* lisp/international/quail.el (quail-update-leim-list-file):
Don't output messages like "Generating ..." in batch mode.
2015-01-03 18:29:23 -08:00
Paul Eggert
7e09ef09a4
Update copyright year to 2015
...
Run admin/update-copyright.
2015-01-01 14:26:41 -08:00
Paul Eggert
732fd4c7e1
Update copyright year to 2015
...
Run admin/update-copyright.
2015-01-01 09:18:06 -08:00
Lars Magne Ingebrigtsen
987d2f9421
Implement a new function `directory-name-p'
...
* doc/lispref/files.texi (Relative File Names): Mention
`directory-name-p'.
* etc/NEWS: Mention directory-name-p.
(directory-name-p): New function.
(directory-files-recursively): Use it.
2014-12-13 16:10:04 +01:00
Lars Magne Ingebrigtsen
3e8e971356
directory-files-recursively symlink fix
...
* files.el (directory-files-recursively): Really check whether
files are symlinks.
2014-12-13 15:50:28 +01:00
Lars Magne Ingebrigtsen
3431e82d16
Ignore directory symlinks in directory-files-recursively
...
* files.el (directory-files-recursively): Don't follow symlinks to
other directories.
2014-12-12 11:52:58 +01:00
Andreas Schwab
94a3f7648c
* files.el (file-tree-walk): Use file-name-as-directory
...
unconditionally.
2014-12-10 09:47:36 +01:00
Lars Magne Ingebrigtsen
c9e3deffab
Speed up directory-files-recursively
...
* files.el (directory-files-recursively): Use
`file-name-all-completions' instead of `directory-files' for
greater speed.
2014-12-10 05:38:23 +01:00
Lars Magne Ingebrigtsen
11cf3e90c6
Implement a new function directory-files-recursively
...
* doc/lispref/files.texi (Contents of Directories): Document
directory-files-recursively.
* etc/NEWS: Mention directory-files-recursively.
* lisp/files.el (find-files): New function.
2014-12-09 07:21:17 +01:00
Eli Zaretskii
2bef807c32
lisp/files.el (file-tree-walk): Doc fix.
2014-12-04 09:58:19 +02:00
Eric S. Raymond
de90917939
Fix punctuation glitches in file-tree-walk docstring.
...
* files.el (file-tree-walk): Fix docstring.
2014-12-03 18:26:34 -05:00
Eric S. Raymond
e820f16c06
Added file-tree-walk to files.el.
2014-12-03 09:28:09 -05:00
Glenn Morris
416148257a
Merge from emacs-24; up to 117687
2014-11-08 10:21:38 -08:00
Michael Albinus
fd16108130
* files.el (file-name-non-special): Wrap the call of
...
`insert-file-contents' by `unwind-protect', in order to set the
buffer's file name anyway.
Fixes: debbugs:18891
2014-11-07 15:42:51 +01:00
Tom Tromey
e72f5197ea
* files.el (auto-mode-alist): Use javascript-mode for .jsm
...
(bug #18719 ).
2014-10-16 13:56:43 -06:00
Mark Oteiza
cebc89eea1
* lisp/files.el (auto-mode-alist): Use sh-mode for .zsh files.
...
Fixes: debbugs:18488
2014-10-04 00:27:10 -07:00
Stefan Monnier
a57fa9642d
* lisp/subr.el (alist-get): New accessor.
...
* lisp/emacs-lisp/gv.el (alist-get): Provide expander.
* lisp/winner.el (winner-remember):
* lisp/tempo.el (tempo-use-tag-list):
* lisp/progmodes/gud.el (minor-mode-map-alist):
* lisp/international/mule-cmds.el (define-char-code-property):
* lisp/frameset.el (frameset-filter-params):
* lisp/files.el (dir-locals-set-class-variables):
* lisp/register.el (get-register, set-register):
* lisp/calc/calc-yank.el (calc-set-register): Use it.
* lisp/ps-print.el (ps-get, ps-put, ps-del): Mark as obsolete.
* lisp/tooltip.el (tooltip-set-param): Mark as obsolete.
(tooltip-show): Use alist-get instead.
* lisp/ses.el (ses--alist-get): Remove. Use alist-get instead.
* admin/unidata/unidata-gen.el (unidata-gen-table-word-list): Use alist-get
and cl-incf.
2014-10-01 13:23:42 -04:00
Stefan Monnier
cbdc06f3be
Rename 24.5 to 25.1
...
Except where we expect to backport the corresponding change.
2014-09-29 14:14:08 -04:00
Leo Liu
fd53ccaafc
* files.el (minibuffer-with-setup-hook): Allow (:append FUN) to
...
append to minibuffer-setup-hook.
Fixes: debbugs:18341
2014-08-29 10:48:17 +08:00
Stefan Monnier
eb7b19f013
* lisp/files.el (out-of-memory-warning-percentage): Turn it off by default.
2014-08-11 22:35:24 -04:00
Glenn Morris
c7367d2de3
Merge from emacs-24; up to 2014-06-28T23:35:17Z!rgm@gnu.org
2014-08-10 17:59:34 -07:00
Glenn Morris
f314e84fce
Revert 2013-01-31 change that decides coding system before backing up
...
It causes a more serious problem than the one it solves.
This closes bug#18141, and reopens bug#13522.
* lisp/files.el (basic-save-buffer-2): Revert 2013-01-31 change.
* src/fileio.c: Revert 2013-01-31 change.
(choose_write_coding_system): No longer callable from Lisp.
Move last piece back here from Fwrite_region.
(Fwrite_region, syms_of_fileio): Update for above changes.
* test/automated/data/files-bug18141.el.gz: New file.
* test/automated/files.el (files-test-bug-18141-file):
New variable and test.
2014-08-10 17:38:19 -07:00
Reuben Thomas
6d9d9cde2f
Remove remaining mentions of VMS as a host
...
* notes/exit-value: Remove specific discussion of VMS.
* doc/emacs/programs.texi (Program Modes): Don't advertise VMS DCL support
any more.
* doc/misc/ediff.texi (Merging and diff3): Don't mention lack of support
for VMS diff, we no longer support VMS.
* lisp/progmodes/ada-mode.el:
* lisp/net/tramp.el (tramp-handle-file-symlink-p):
* lisp/net/tramp-ftp.el (tramp-ftp-file-name-handler): Remove a comment
about VMS, which we no longer support.
* lisp/progmodes/ada-xref.el (ada-xref-current): Remove mention of VMS,
and fix a FIXME, using convert-standard-filename in place of
removed ada-convert-file-name.
* lisp/url/url-handlers.el: Remove a comment about VMS, which we no longer
support.
2014-08-07 12:49:36 +01:00
Reuben Thomas
6c5bbf8a00
Fix a few ``MS-DOG''s overlooked in the previous commit.
...
* README: ``MSDOG'' becomes ``MS-DOS''.
* lisp/arc-mode.el: Fix a couple of ``MS-DOG''s missed in the previous
commit.
* lisp/file-mode.el: ditto.
* src/editfns.c: Fix a couple of ``MS-DOG''s missed in the previous commit.
* src/xfaces.c: ditto.
2014-08-07 11:15:52 +01:00
Glenn Morris
da41ffdd08
Merge from emacs-24; up to 2014-06-26T06:55:15Z!rgm@gnu.org
2014-07-28 05:39:09 -04:00
Glenn Morris
59bb37859d
More toggle-read-only doc tweaks
...
* lisp/files.el (toggle-read-only): Re-add basic doc-string.
* lisp/vc/vc-hooks.el (vc-toggle-read-only): Tweak obsolescence mesage.
2014-07-25 05:24:53 -04:00
Glenn Morris
190644a011
Merge from emacs-24; up to 2014-06-25T10:17:41Z!rgm@gnu.org
2014-07-21 02:03:08 -04:00
Glenn Morris
f6c951e5d2
Small fixes re toggle-read-only, mainly doc
...
* progmodes/hideif.el (hide-ifdef-mode-submap): Also substitute read-only-mode.
* bindings.el (mode-line-toggle-read-only):
* bs.el (bs-toggle-readonly):
* buff-menu.el (Buffer-menu-toggle-read-only):
* dired.el (dired-toggle-read-only):
* files.el (view-read-only, find-file-read-only)
(find-file-read-only-other-window)
(find-file-read-only-other-frame):
* progmodes/hideif.el (hide-ifdef-toggle-outside-read-only):
Doc fixes re toggle-read-only.
* view.el: Comment updates.
2014-07-21 01:38:17 -04:00
Dmitry Antipov
3aa96ff51e
* src/alloc.c (Fmemory_info) [HAVE_LINUX_SYSINFO]: Return nil if
...
sysinfo failed. Adjust docstring.
* doc/lispref/internals.texi (Garbage Collection): Mention memory-info.
* lisp/files.el (out-of-memory-warning-percentage): New defcustom.
(warn-maybe-out-of-memory): Use it.
2014-07-11 16:19:58 +04:00
Eli Zaretskii
64c333303c
lisp/files.el (warn-maybe-out-of-memory): Fix the wording of the warning.
2014-07-10 21:19:37 +03:00
Dmitry Antipov
53dc172807
* files.el (warn-maybe-out-of-memory): Fix last change.
2014-07-10 17:00:45 +04:00
Dmitry Antipov
9242810cd3
* configure.ac: Check whether sys/sysinfo.h provides
...
Linux 'sysinfo' function and 'struct sysinfo' type.
* src/alloc.c (Fmemory_info): New function.
* lisp/files.el (warn-maybe-out-of-memory): New function.
(find-file-noselect): Use it.
2014-07-10 16:33:35 +04:00
Stefan Monnier
8076b12438
* lisp/files.el (minibuffer-with-setup-hook): Evaluate the first arg eagerly.
2014-06-27 21:10:27 -04:00