1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-18 10:16:51 +00:00
Commit Graph

1560 Commits

Author SHA1 Message Date
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
Dmitry Antipov
5697ca55cb Do not allow out-of-range character position in Fcompare_strings.
* src/fns.c (validate_subarray): Add prototype.
(Fcompare_substring): Use validate_subarray to check ranges.
Adjust comment to mention that the semantics was changed.  Also see
http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00447.html.
* lisp/files.el (dir-locals-find-file, file-relative-name):
* lisp/info.el (Info-complete-menu-item):
* lisp/minibuffer.el (completion-table-subvert): Prefer string-prefix-p
to compare-strings to avoid out-of-range errors.
* lisp/subr.el (string-prefix-p): Adjust to match strict range
checking in compare-strings.
* test/automated/fns-tests.el (fns-tests-compare-string): New test.
2014-06-25 14:36:51 +04:00
Kevin Ryde
08cedf2e40 * lisp/files.el (auto-mode-alist): Map .ad files to xdefaults-mode.
Fixes: debbugs:17745
2014-06-11 22:14:45 -04:00
Glenn Morris
fd60bf6c90 Merge from emacs-24; up to 2014-06-02T11:35:40Z!michael.albinus@gmx.de 2014-06-08 16:41:43 -07:00
Glenn Morris
99d8aedf0d Doc edits re uniquify
* doc/emacs/buffers.texi (Uniquify): Copyedits.

* doc/emacs/files.texi (Visiting): Update for uniquify changes.

* doc/lispref/files.texi (Subroutines of Visiting): Mention uniquify.

* doc/misc/vip.texi (Files): Defer to Emacs manual for uniquify details.

* lisp/bookmark.el (bookmark-load): Doc fix.

* lisp/uniquify.el (uniquify-buffer-name-style): Doc fix.

* lisp/files.el: Comment.

* etc/NEWS: Related edit.
2014-06-08 00:41:27 -07:00
Glenn Morris
b5d6fe3bf6 * lisp/files.el (locate-dominating-file): Expand file argument.
Fixes: debbugs:17641
2014-05-30 19:27:22 -07:00
Daniel Colascione
708374c7bc File-local-variable support for sh-script; add mksh support
* lisp/files.el (interpreter-mode-alist): Add mksh.

* lisp/progmodes/sh-script.el (sh-ancestor-alist): Add mksh, a pdksh
derivative.
(sh-alias-alist): Alias /system/bin/sh (Android's system shell) to
mksh. Improve custom spec; allow regular expressions.
(sh-shell): Delegate name splitting to `sh-canonicalize-shell'.
(sh-after-hack-local-variables): New function.
(sh-mode): Use it; respect file-local `sh-shell' variable.
(sh-set-shell): Use `sh-canonicalize-shell' instead of open-coding
the normalization.
(sh-canonicalize-shell): Rewrite to support regexes.

Fixes: debbugs:17333
2014-05-20 18:54:33 -07:00
Glenn Morris
d63d883a97 Add with-file-modes macro, and use it
* lisp/subr.el (with-file-modes): New macro.

* lisp/printing.el (pr-save-file-modes):
* lisp/eshell/esh-util.el (eshell-with-file-modes): Make obsolete.

* lisp/emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2):
Add with-file-modes.

* lisp/doc-view.el (doc-view-make-safe-dir):
* lisp/epg.el (epg--start):
* lisp/files.el (locate-user-emacs-file, make-temp-file)
(backup-buffer-copy, move-file-to-trash):
* printing.el (pr-despool-print, pr-call-process, pr-text2ps):
* eshell/esh-util.el (eshell-with-private-file-modes)
(eshell-make-private-directory):
* lisp/net/browse-url.el (browse-url-mosaic):
* lisp/obsolete/mailpost.el (post-mail-send-it):
* lisp/obsolete/pgg-pgp.el (pgg-pgp-verify-region):
* lisp/obsolete/pgg-pgp5.el (pgg-pgp5-verify-region):
* lisp/url/url-util.el (url-make-private-file):
Use with-file-modes.

* doc/lispref/files.texi (Changing Files): Mention with-file-modes.

* etc/NEWS: Mention this.
2014-05-14 10:15:15 -07:00
Glenn Morris
bbbabffe06 Merge from emacs-24; up to 2014-05-12T06:15:47Z!rgm@gnu.org 2014-05-11 23:59:30 -07:00
Glenn Morris
1d75432d5c Use file-accessible-directory-p in some more places
* lisp/files.el (file-expand-wildcards):
* lisp/man.el (Man-support-local-filenames):
* lisp/printing.el (pr-i-directory, pr-interface-directory):
* lisp/progmodes/grep.el (lgrep, rgrep):
* lisp/textmodes/ispell.el (ispell-call-process)
(ispell-call-process-region, ispell-start-process)
(ispell-init-process):
* lisp/mh-e/mh-e.el (mh-variants):
Use file-accessible-directory-p.
2014-05-09 00:02:00 -07:00
Glenn Morris
2651ed05dc * files.el (cd-absolute): Test if directory is accessible
rather than executable. 

This can't be any worse, and may be better in some situations.
It may or may not fix bug#17330.
2014-05-08 23:53:30 -07:00
Daniel Colascione
7e31acf6b8 Merge from emacs-24; up to 2014-04-01T20:18:12Z!eggert@cs.ucla.edu 2014-04-07 13:54:16 -07:00
Glenn Morris
8a1d24b11e Doc updates for buffer-stale-function now applying to file buffers too
* doc/emacs/arevert-xtra.texi (Supporting additional buffers):
* doc/lispref/backups.texi (Reverting):
Update for buffer-stale-function also applying to file-buffers.

* lisp/autorevert.el (auto-revert-buffers):
* lisp/files.el (buffer-stale--default-function)
(buffer-stale-function, revert-buffer--default): Doc tweaks.

* etc/NEWS: Related edits.
2014-04-03 22:09:35 -04:00
Glenn Morris
d738ebdccf Doc updates related to changes in revert-buffer function variables
* lisp/files.el (make-backup-file-name-function)
(make-backup-file-name, make-backup-file-name--default-function)
(make-backup-file-name-1, find-backup-file-name)
(revert-buffer-function, revert-buffer-insert-file-contents-function)
(buffer-stale--default-function, buffer-stale-function)
(before-revert-hook, after-revert-hook, revert-buffer-in-progress-p)
(revert-buffer, revert-buffer--default)
(revert-buffer-insert-file-contents--default-function):
Doc fixes related to defaults no longer being nil.
(make-backup-file-name-function): Bump :version.
Restore nil as a valid but deprecated custom type.

* etc/NEWS: Related edit.
2014-04-03 00:06:40 -07:00
Glenn Morris
11ee65afc2 Remove the build-time option CLASH_DETECTION
Every platform supports it, and the runtime option `create-lockfiles'
replaces it.

* configure.ac (CLASH_DETECTION): Remove option.

* lisp/files.el (lock-buffer, unlock-buffer, file-locked-p):
Remove fallback aliases, since they are always defined now.

* src/buffer.c (Frestore_buffer_modified_p, Fkill_buffer):
* src/emacs.c (shut_down_emacs):
* src/fileio.c (Finsert_file_contents, write_region):
* src/filelock.c (top-level, syms_of_filelock):
* src/insdel.c (prepare_to_modify_buffer_1):
CLASH_DETECTION is always defined now.

* admin/CPP-DEFINES: Remove CLASH_DETECTION.
2014-03-25 21:14:44 -04:00
Glenn Morris
f9c81e7b48 Include interactive-only information in describe-function output
* lisp/help-fns.el (help-fns--interactive-only): New function.
(help-fns-describe-function-functions): Add the above function.

* lisp/simple.el (beginning-of-buffer, end-of-buffer, insert-buffer)
(next-line, previous-line): Remove hand-written interactive-only
information from doc strings, it is auto-generated now.

* lisp/bookmark.el (bookmark-write):
* lisp/epa-mail.el (epa-mail-decrypt, epa-mail-verify, epa-mail-sign)
(epa-mail-import-keys): Mark interactive-only,
and remove hand-written interactive-only information from doc strings.

* lisp/epa.el (epa-decrypt-armor-in-region, epa-verify-region)
(epa-verify-cleartext-in-region, epa-sign-region, epa-encrypt-region):
* lisp/files.el (not-modified):
* lisp/simple.el (mark-whole-buffer): Mark interactive-only.

* doc/lispref/commands.texi (Defining Commands):
Mention that interactive-only also affects describe-function.

* etc/NEWS: Mention this.
2014-03-22 15:36:29 -07:00
Glenn Morris
5076d27513 Allow `declare' to set the interactive-only property
* lisp/emacs-lisp/byte-run.el (defun-declarations-alist):
Add interactive-only.  Doc tweak.
(macro-declarations-alist): Doc tweak.

* lisp/subr.el (declare): Doc tweak (add xref to manual).

* lisp/comint.el (comint-run):
* lisp/files.el (insert-file-literally, insert-file):
* lisp/replace.el (replace-string, replace-regexp):
* lisp/simple.el (beginning-of-buffer, end-of-buffer, delete-backward-char)
(delete-forward-char, goto-line, insert-buffer, next-line)
(previous-line): Set interactive-only via declare.

* doc/lispref/functions.texi (Declare Form): Add interactive-only.

* doc/lispref/commands.texi (Defining Commands) Mention declare.

* etc/NEWS: Mention this.
2014-03-22 15:12:52 -07:00
Martin Rudalics
b92631bf71 Fix behavior of with-temp-buffer-window (Bug#16816, Bug#17007).
* window.el (with-temp-buffer-window): Don't make BUFFER-OR-NAME
current (Bug#16816, Bug#17007).
(with-current-buffer-window): New macro doing the same as
`with-temp-buffer-window' but with BUFFER-OR-NAME current.
* help.el (help-print-return-message): Warn in doc-string to not
use this in `with-help-window'.
(describe-bindings-internal): Call `describe-buffer-bindings'
from within help buffer.  See Juanma's scenario in (Bug#16816).
(with-help-window): Update doc-string.
* dired.el (dired-mark-pop-up):
* files.el (save-buffers-kill-emacs):
* register.el (register-preview): Use `with-current-buffer-window'
instead of `with-temp-buffer-window'.
* display.texi (Temporary Displays): Rewrite descriptions of
`with-output-to-temp-buffer' and `with-temp-buffer-window'.
* help.texi (Help Functions): Rewrite description of
`with-help-window'.
2014-03-16 10:26:58 +01:00
Glenn Morris
776aa43207 * lisp/files.el (find-file): Doc fix: update info node name. 2014-03-10 14:48:35 -04:00
Glenn Morris
bd2d43dc74 Recognize dash shell
* lisp/files.el (interpreter-mode-alist):
* lisp/progmodes/sh-script.el (sh-ancestor-alist): Add dash.

Fixes: debbugs:16938
2014-03-05 13:58:16 -05:00
Stefan Monnier
092c12b253 * lisp/files.el (hack-local-variables): Mention file name in warning. 2014-03-03 22:26:17 -05:00
Lars Ingebrigtsen
f3c6024192 * files.el (confirm-kill-emacs): Clarify doc (bug#15455). 2014-02-09 22:07:30 -08:00
Lars Ingebrigtsen
6abe458993 * files.el (confirm-kill-emacs): Allow specifying an arbitrary predicate function.
Fixes: debbugs:15455
2014-02-09 20:26:10 -08:00
Glenn Morris
34dc21db6e Replace "Maintainer: FSF" with the emacs-devel mailing address 2014-02-09 17:34:22 -08:00
Lars Ingebrigtsen
7e34193f01 (save-buffer): Clarify the 0 argument (bug#10346).
Fixes: debbugs:13261
2014-02-08 21:32:41 -08:00
Lars Ingebrigtsen
468ef48472 * files.el (save-buffer): Use ARG as the parameter name for consistency
Fixes: debbugs:10346
2014-02-08 21:30:41 -08:00
Lars Ingebrigtsen
2356b31687 (backup-inhibited): Doc clarification
Fixes: debbugs:12525
2014-02-08 19:02:45 -08:00
Lars Ingebrigtsen
5a836f5897 (locate-file): Suffixes aren't returned, so don't say that they are
Fixes: debbugs:12674
2014-02-08 18:58:24 -08:00
Lars Ingebrigtsen
9e108fe61d * files.el (find-file-noselect): Clarify prompt when changing readedness.
Fixes: debbugs:13261
2014-02-08 18:44:25 -08:00
Lars Ingebrigtsen
893cc9082c * files.el (find-file-visit-truename): Doc clarification (bug#14697). 2014-02-07 22:58:15 -08:00
Lars Ingebrigtsen
15cb9968c0 * files.el (file-relative-name): Doc fix.
Fixes: debbugs:15159
2014-02-07 20:53:52 -08:00
Paul Eggert
d5081c1ed8 Spelling fixes.
* calc/calc-yank.el (calc-edit-mode, calc-edit-cancel):
* emacs-lisp/debug.el (cancel-debug-on-entry):
* epg.el (epg-error-to-string):
* files.el (recover-file):
* lpr.el (lpr-buffer, print-buffer, lpr-region, print-region):
* mail/emacsbug.el (report-emacs-bug-hook):
* mail/sendmail.el (mail-recover):
* ses.el (ses-yank-resize):
* term/ns-win.el (ns-print-buffer):
Spelling fixes in diagnostics, mostly for "canceled" with one L.
* epg.el (epg-key-capability-alist): Rename from misspelled version.
All uses changed.
* obsolete/xesam.el (xesam-all-fields): Fix misspelled field name.
2014-01-05 22:25:30 -08:00
Paul Eggert
ba3189039a Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
Chong Yidong
e2f6a0bc34 * files.el (break-hardlink-on-save): Doc fix.
Suggested by Xue Fuqiao.

Fixes: debbugs:13801
2013-12-17 23:09:13 +08:00
Glenn Morris
3e2fb4db3f Make the interactive-only' bytecomp warning like the obsolete' one
* emacs-lisp/bytecomp.el (byte-compile-form):
Make the `interactive-only' warning like the `obsolete' one.

* comint.el (comint-run):
* files.el (insert-file-literally, insert-file):
* replace.el (replace-string, replace-regexp):
* simple.el (beginning-of-buffer, end-of-buffer, delete-backward-char)
(goto-line, insert-buffer, next-line, previous-line):
Tweak `interactive-only' spec.
2013-11-30 00:42:28 -08:00
Bozhidar Batsov
2bb3a748b3 * lisp/emacs-lisp/bytecomp.el (byte-compile-interactive-only-functions):
Mark as obsolete and replace it with a symbol property.
(byte-compile-form): Use new 'interactive-only property.
* lisp/comint.el, lisp/files.el, lisp/replace.el, lisp/simple.el:
Apply new 'interactive-only properly.
2013-11-25 19:16:32 +02:00
Stefan Monnier
53b39e8977 * lisp/subr.el (custom-declare-variable-early): Remove function.
(custom-declare-variable-list): Remove var.
(error, user-error): Remove `while' loop.
(read-quoted-char-radix, read-quoted-char): Move to simple.el.
(user-emacs-directory-warning, locate-user-emacs-file):
Move to files.el.
* lisp/simple.el (read-quoted-char-radix, read-quoted-char):
* lisp/files.el (user-emacs-directory-warning, locate-user-emacs-file):
Move from subr.el.
* lisp/custom.el (custom-declare-variable-list): Don't process
custom-declare-variable-list.
2013-10-29 22:14:16 -04:00