Kira Bruneau
3e60f7f3c3
Fix ignored-local-variable-values for non-primitive values
...
* lisp/files.el (hack-local-variables-filter): Fix
`ignored-local-variable-values' for non-primitive values (bug#56957).
2022-08-04 08:26:38 +02:00
Paul Eggert
2cd204d8bb
Prefer ‘time-equal-p’ to ‘equal’ on timestamps
...
This is more robust since timestamps can have multiple forms.
* lisp/auth-source.el (auth-source-netrc-parse):
* lisp/bookmark.el (bookmark--watch-file-already-queried-p)
(bookmark-maybe-load-default-file):
* lisp/cedet/semantic/db.el (semanticdb-needs-refresh-p):
* lisp/dired.el (dired-directory-changed-p):
* lisp/files.el (dir-locals-find-file):
* lisp/gnus/gnus-util.el (gnus-cache-file-contents):
* lisp/gnus/nneething.el (nneething-create-mapping):
* lisp/gnus/nnfolder.el (nnfolder-read-folder):
* lisp/gnus/nnmaildir.el (nnmaildir--update-nov)
(nnmaildir--scan, nnmaildir-request-scan)
(nnmaildir-request-update-info):
* lisp/gnus/nnmh.el (nnmh-update-gnus-unreads):
* lisp/gnus/spam-stat.el (spam-stat-load):
* lisp/mail/mailabbrev.el (mail-abbrevs-sync-aliases):
* lisp/mail/sendmail.el (sendmail-sync-aliases):
* lisp/net/netrc.el (netrc-parse):
* lisp/nxml/rng-loc.el (rng-get-parsed-schema-locating-file):
* lisp/play/cookie1.el (cookie-snarf):
* lisp/vc/vc-cvs.el (vc-cvs-state-heuristic):
* lisp/vc/vc-hg.el (vc-hg--ignore-patterns-valid-p)
(vc-hg--cached-dirstate-search):
* lisp/vc/vc-hooks.el (vc-after-save):
Prefer ‘time-equal-p’ to ‘equal’ when comparing
timestamps for equality.
2022-08-01 01:17:17 -07:00
Lars Ingebrigtsen
623356ee94
Fix compilation warnings in tramp-loaddefs.el
...
* lisp/files.el (file-name-quoted-p): Autoload because it's
referred to from tramp-loaddefs.
* lisp/net/tramp.el (defvar): Put the entire form into the
loaddefs file instead of eval-and-compile -- this fixes a
dependency problem when byte-compiling the loaddefs file.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-default-host-alist)
(tramp-local-host-regexp, tramp-terminal-type)
(tramp-foreign-file-name-handler-alist): Autoload to avoid
compilation warnings. Also put (require 'cl-lib) into the
loaddefs file for the same reason.
(tramp-ensure-dissected-file-name)
(tramp-set-completion-function)
(tramp-register-foreign-file-name-handler): Autoload.
2022-07-31 12:01:10 +02:00
Stefan Kangas
a4cf4893d1
Delete aliases obsolete since 21.1 and 22.1
...
* lisp/ls-lisp.el (ls-lisp-dired-ignore-case):
* lisp/files.el (find-file-not-found-hooks): Delete variable aliases,
obsolete since 21.1 and 22.1 respectively.
2022-07-31 11:01:57 +02:00
Stefan Kangas
7b55a3dab6
Merge from origin/emacs-28
...
23112f89f9
; Improve documentation of 'file-name-with-extension'
4be938169d
Release the desktop lock in 'kill-emacs-hook'
4ea1f6c7f8
; * doc/lispref/tips.texi (Documentation Tips): Fix typos....
# Conflicts:
# doc/lispref/tips.texi
2022-07-28 14:56:24 +02:00
Eli Zaretskii
23112f89f9
; Improve documentation of 'file-name-with-extension'
...
* lisp/files.el (file-name-with-extension): Doc fix. (Bug#56809)
2022-07-28 10:45:43 +03:00
Sam Steingold
70341cab3e
string-equal-ignore-case: new function
...
* lisp/cedet/semantic/complete.el (semantic-collector-calculate-completions):
Use `string-prefix-p' instead of explicit `compare-strings'.
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns):
Add `string-equal-ignore-case'.
* lisp/emacs-lisp/cl-extra.el (cl-equalp): Use `string-equal-ignore-case'.
* lisp/emacs-lisp/shadow.el (load-path-shadows-find): Likewise.
* lisp/emacs-lisp/shortdoc.el (string): Add `string-equal-ignore-case'.
* lisp/files.el (file-truename): Use `string-equal-ignore-case'.
(file-relative-name): Likewise.
* lisp/gnus/gnus-art.el (article-hide-boring-headers):
Use `string-equal-ignore-case' instead of `gnus-string-equal'.
* lisp/gnus/gnus-util.el (gnus-string-equal):
Remove, use `string-equal-ignore-case' instead.
* lisp/international/mule-cmds.el (describe-language-environment):
Use `string-equal-ignore-case'.
(locale-charset-match-p): Likewise.
* lisp/man.el (Man-softhyphen-to-minus): Use `string-prefix-p'.
* lisp/minibuffer.el (completion--string-equal-p):
Remove, use `string-equal-ignore-case' instead.
(completion--twq-all): Use `string-equal-ignore-case'.
(completion--do-completion): Likewise.
* lisp/net/browse-url.el (browse-url-default-windows-browser):
Use `string-prefix-p' instead of explicit `compare-strings'.
* lisp/org/ob-core.el (org-babel-results-keyword):
Use `string-equal-ignore-case' instead of explicit `compare-strings'.
(org-babel-insert-result): Likewise.
* lisp/org/org-compat.el (string-equal-ignore-case):
Define unless defined already.
(org-mode-flyspell-verify): Use `string-equal-ignore-case'.
* lisp/org/org-lint.el (org-lint-duplicate-custom-id): Likewise.
* lisp/org/ox.el (org-export-resolve-radio-link): Use
`string-equal-ignore-case' and `string-clean-whitespace'.
* lisp/progmodes/flymake-proc.el
(flymake-proc--check-patch-master-file-buffer):
Use `string-prefix-p' instead of explicit `compare-strings'.
* lisp/progmodes/idlwave.el (idlwave-class-or-superclass-with-tag):
Use `string-equal-ignore-case' instead of explicit `compare-strings'.
* lisp/subr.el (member-ignore-case): Use `string-equal-ignore-case'.
(string-equal-ignore-case): Compare strings ignoring case.
* lisp/textmodes/bibtex.el (bibtex-string=): Remove.
(bibtex-format-entry, bibtex-font-lock-url, bibtex-autofill-entry)
(bibtex-print-help-message, bibtex-validate, bibtex-validate-globally)
(bibtex-clean-entry, bibtex-completion-at-point-function, (bibtex-url):
Use `string-equal-ignore-case' instead of `bibtex-string='.
* lisp/textmodes/sgml-mode.el (sgml-get-context):
Use `string-equal-ignore-case' instead of explicit `compare-strings'.
(sgml-calculate-indent): Likewise
* test/lisp/subr-tests.el (string-comparison-test):
Add tests for `string-equal-ignore-case'.
2022-07-26 13:49:28 -04:00
Mattias Engdegård
e536fb0851
Use ash
instead of lsh
...
* lisp/files.el (file-modes-number-to-symbolic):
* lisp/image/exif.el (exif--direct-ascii-value):
* lisp/term/haiku-win.el (defun):
* lisp/x-dnd.el (x-dnd-handle-xdnd, x-dnd-handle-motif):
`lsh` is slower and has confusing semantics; avoid.
2022-07-19 15:21:56 +02:00
Stefan Kangas
2a05479c22
; Fix typos: prefer American spelling
2022-07-14 12:13:31 +02:00
Stefan Kangas
f83d7cc312
Make remote-shell-program default to ssh only
...
* lisp/files.el (remote-shell-program): Default to "ssh" only. The
other commands in this list have severe security issues, and it is
easy enough for users to customize them manually if they want to.
See also the discussion in: https://debbugs.gnu.org/56461
2022-07-12 12:42:39 +02:00
Stefan Kangas
c8c8bbd855
Merge from origin/emacs-28
...
115261b323
; Improve wording of recently-changed doc strings.
2022-07-10 06:30:35 +02:00
Eli Zaretskii
115261b323
; Improve wording of recently-changed doc strings.
...
* lisp/simple.el (auto-save-mode):
* lisp/files.el (auto-save-visited-mode): Improve wording of the
doc strings.
2022-07-09 10:39:57 +03:00
Stefan Kangas
739e3dbe05
Remove many items obsolete since 24.1
...
* lisp/allout.el (allout-abbreviate-flattened-numbering)
(allout-mode-deactivate-hook):
* lisp/ansi-color.el (ansi-color-unfontify-region):
* lisp/auth-source.el (auth-source-hide-passwords)
(auth-source-user-or-password)
(auth-source-forget-user-or-password):
* lisp/cedet/data-debug.el (data-debug-map):
* lisp/cedet/semantic/grammar.el (semantic-grammar-syntax-table)
(semantic-grammar-map):
* lisp/chistory.el (command-history-map):
* lisp/comint.el (comint-dynamic-complete)
(comint-dynamic-complete-as-filename)
(comint-dynamic-simple-complete):
* lisp/dired-x.el (read-filename-at-point)
(dired-x-submit-report):
* lisp/dos-fns.el (register-name-alist, make-register)
(register-value, set-register-value, intdos, mode25, mode4350):
* lisp/emacs-lisp/bytecomp.el (byte-compile-disable-print-circle):
* lisp/emacs-lisp/chart.el (chart-map):
* lisp/emacs-lisp/package.el (package-menu-view-commentary):
* lisp/emacs-lock.el (toggle-emacs-lock, emacs-lock-from-exiting):
* lisp/erc/erc.el (erc-complete-word):
* lisp/eshell/em-cmpl.el (eshell-cmpl-suffix-list):
* lisp/eshell/esh-util.el (eshell-for):
* lisp/files.el (inhibit-first-line-modes-regexps)
(inhibit-first-line-modes-suffixes):
* lisp/gnus/gnus-msg.el (gnus-outgoing-message-group)
(gnus-debug-files, gnus-debug-exclude-variables):
* lisp/gnus/gnus-registry.el (gnus-registry-user-format-function-M):
* lisp/gnus/gnus.el (gnus-local-domain, gnus-carpal):
* lisp/gnus/nnimap.el (nnimap-split-rule):
* lisp/iimage.el (turn-on-iimage-mode):
* lisp/image.el (image-extension-data, image-library-alist):
* lisp/mail/emacsbug.el (report-emacs-bug-pretest-address):
* lisp/mail/mail-utils.el (rmail-dont-reply-to):
* lisp/mail/mailalias.el (mail-complete-function)
(mail-completion-at-point-function):
* lisp/mail/rmail.el (rmail-dont-reply-to-names)
(rmail-default-dont-reply-to-names):
* lisp/mail/sendmail.el (mail-mailer-swallows-blank-line)
(mail-sent-via):
* lisp/menu-bar.el (menu-bar-kill-ring-save):
* lisp/minibuffer.el (completion-annotate-function)
(minibuffer-local-filename-must-match-map):
* lisp/msb.el (msb-after-load-hooks):
* lisp/obsolete/eieio-compat.el (eieio-defmethod)
(eieio-defgeneric):
* lisp/obsolete/info-edit.el (Info-edit-map):
* lisp/obsolete/starttls.el (starttls-any-program-available):
* lisp/progmodes/cfengine.el (cfengine-mode-abbrevs):
* lisp/progmodes/cwarn.el (turn-on-cwarn-mode):
* lisp/progmodes/make-mode.el (makefile-complete):
* lisp/progmodes/meta-mode.el (meta-complete-symbol)
(meta-mode-map):
* lisp/progmodes/pascal.el (pascal-toggle-completions)
(pascal-last-completions, pascal-show-completions):
* lisp/progmodes/prolog.el (prolog-char-quote-workaround):
* lisp/progmodes/which-func.el (which-func-mode): [FUNCTION]
* lisp/simple.el (count-lines-region, minibuffer-completing-symbol):
* lisp/speedbar.el (speedbar-syntax-table, speedbar-key-map):
* lisp/strokes.el (strokes-report-bug):
* lisp/subr.el (condition-case-no-debug):
* lisp/term/ns-win.el (ns-alternatives-map)
(ns-store-cut-buffer-internal):
* lisp/term/w32-win.el (w32-default-color-map):
* lisp/term/x-win.el (x-cut-buffer-or-selection-value):
* lisp/textmodes/bibtex.el (bibtex-complete)
(bibtex-entry-field-alist):
* lisp/textmodes/reftex-index.el (reftex-index-map)
(reftex-index-phrases-map):
* lisp/textmodes/reftex-sel.el (reftex-select-label-map)
(reftex-select-bib-map):
* lisp/textmodes/reftex-toc.el (reftex-toc-map):
* lisp/textmodes/rst.el (rst-block-face, rst-external-face)
(rst-definition-face, rst-directive-face, rst-comment-face)
(rst-emphasis1-face, rst-emphasis2-face, rst-literal-face)
(rst-reference-face):
* lisp/vc/vc-hooks.el (vc-toggle-read-only):
* lisp/view.el (view-return-to-alist)
(view-return-to-alist-update): Remove many functions and variables
obsolete since 24.1.
* lisp/textmodes/bibtex.el (bibtex-entry-alist): Don't use above
removed variable 'bibtex-entry-field-alist'.
* lisp/cedet/data-debug.el (data-debug-edebug-expr)
(data-debug-eval-expression):
* lisp/emacs-lisp/trace.el (trace--read-args):
* lisp/files-x.el (read-file-local-variable-value):
* lisp/simple.el (read--expression): Don't use above removed variable
'minibuffer-completing-symbol'.
* lisp/textmodes/rst.el (rst-font-lock-keywords): Don't use above
removed variables.
* src/w32fns.c (Fw32_default_color_map): Delete obsolete function.
(syms_of_w32fns): Delete defsubr for above defun.
* src/keyboard.c (syms_of_keyboard) <Vdeferred_action_list>
<Vdeferred_action_function>: Delete DEFVARs.
<Qdeferred_action_function>: Delete DEFSYM.
(syms_of_keyboard_for_pdumper): Adjust for above change.
(command_loop_1): Don't run deferred-action-function hook.
* lisp/subr.el (deferred-action-list, deferred-action-function):
Delete obsoletion statements.
* lisp/emacs-lisp/ert-x.el (ert-simulate-command): Don't run
'deferred-action-list' hook.
* doc/lispref/hooks.texi (Standard Hooks): Delete
'deferred-action-function'.
* lisp/emacs-lisp/lisp.el (field-complete):
* lisp/eshell/em-cmpl.el (eshell-cmpl-initialize):
* lisp/gnus/gnus-msg.el (gnus-inews-insert-gcc):
* lisp/gnus/nnmail.el (nnmail-fancy-expiry-target):
* lisp/mail/mail-utils.el (mail-dont-reply-to):
* lisp/mail/sendmail.el (sendmail-send-it):
* lisp/mail/smtpmail.el (smtpmail-send-it):
* lisp/minibuffer.el (minibuffer-completion-help):
* lisp/progmodes/python.el: Don't use above removed items.
* lisp/emacs-lisp/eieio-core.el:
* lisp/mail/mailalias.el (mail-complete-alist): Doc fixes; don't refer
to above removed items.
; * etc/NEWS: List removed items.
2022-07-08 14:10:38 +02:00
Stefan Kangas
3e7f6ff4b0
Prefer defcustom :safe to putting 'safe-local-variable'
...
* lisp/emacs-lisp/lisp-mode.el (lisp-indent-offset)
(lisp-body-indent, emacs-lisp-docstring-fill-column):
* lisp/files.el (version-control):
* lisp/progmodes/modula2.el (m2-indent):
* lisp/progmodes/octave.el (octave-block-offset):
* lisp/progmodes/sh-script.el (sh-basic-offset):
* lisp/progmodes/tcl.el (tcl-indent-level)
(tcl-continued-indent-level):
* lisp/simple.el (fill-prefix):
* lisp/textmodes/fill.el (colon-double-space):
* lisp/textmodes/paragraphs.el (paragraph-start)
(paragraph-separate, sentence-end-double-space)
(sentence-end-without-period, sentence-end-without-space)
(sentence-end, sentence-end-base, page-delimiter)
(paragraph-ignore-fill-prefix):
* lisp/textmodes/tex-mode.el (tex-fontify-script):
* lisp/vc/add-log.el (add-log-dont-create-changelog-file):
* lisp/vc/vc-hooks.el (vc-follow-symlinks): Prefer defcustom :safe to
putting 'safe-local-variable'.
2022-07-06 20:50:42 +02:00
Stefan Kangas
6a7bb1ddbc
Make some additional defcustom types more restrictive
...
* lisp/desktop.el (desktop-lazy-idle-delay):
* lisp/files.el (dired-kept-versions)
(kept-old-versions, kept-new-versions):
* lisp/filesets.el (filesets-max-submenu-length)
(filesets-max-entry-length, filesets-tree-max-level)
(filesets-query-user-limit):
* lisp/hi-lock.el (hi-lock-file-patterns-range)
(hi-lock-highlight-range):
* lisp/ido.el (ido-max-work-directory-list):
* lisp/image/gravatar.el (gravatar-cache-ttl):
* lisp/imenu.el (imenu-auto-rescan-maxout, imenu-max-items):
* lisp/informat.el (Info-split-threshold):
* lisp/mail/hashcash.el (hashcash-default-payment)
(hashcash-default-accept-payment):
* lisp/mail/mail-hist.el (mail-hist-history-size):
* lisp/mail/smtpmail.el (smtpmail-retries):
* lisp/msb.el (msb-display-most-recently-used):
* lisp/nxml/rng-valid.el (rng-state-cache-distance)
(rng-validate-chunk-size):
* lisp/progmodes/gdb-mi.el (gdb-max-source-window-count):
* lisp/recentf.el (recentf-arrange-by-rules-min-items):
* lisp/simple.el (kill-ring-max, mark-ring-max)
(global-mark-ring-max):
* lisp/tab-line.el (tab-line-tab-name-truncated-max):
* lisp/term.el (term-buffer-maximum-size, term-input-chunk-size):
* lisp/thumbs.el (thumbs-max-image-number)
(thumbs-thumbsdir-max-size, thumbs-relief, thumbs-margin)
(thumbs-image-resizing-step):
* lisp/type-break.el (type-break-interval)
(type-break-good-rest-interval, type-break-query-interval)
(type-break-warning-repeat):
* lisp/vc/compare-w.el (compare-windows-sync-string-size):
* lisp/woman.el (woman-fill-column): Use defcustom :type natnum.
* lisp/emacs-lisp/backtrace.el (backtrace-line-length):
* lisp/doc-view.el (doc-view-conversion-refresh-interval):
Use defcustom :type natnum and allow the nil value.
* lisp/gnus/spam-stat.el (spam-stat-process-directory-age):
Use defcustom :type integer.
2022-07-06 19:29:51 +02:00
Stefan Kangas
2be06b13dd
Merge from origin/emacs-28
...
6b5d829d9d
Add index entry for "ignore case"
29e1459965
; * lisp/files.el (remote-file-name-inhibit-cache): Minor ...
2022-07-06 06:30:39 +02:00
Stefan Kangas
fe82c0743b
Rename new option to remote-file-name-inhibit-auto-save-visited
...
* lisp/files.el (remote-file-name-inhibit-auto-save-visited):
Rename from 'auto-save-visited-remote-files' and invert logic.
(auto-save-visited-mode): Adjust accordingly. (Bug#41333)
Suggested by Michael Albinus <michael.albinus@gmx.de>.
2022-07-05 19:48:54 +02:00
Stefan Kangas
29e1459965
; * lisp/files.el (remote-file-name-inhibit-cache): Minor doc fix.
2022-07-05 19:32:15 +02:00
Eli Zaretskii
59276ff81d
; * lisp/files.el (auto-save-visited-predicate): Doc fix.
2022-07-05 16:12:13 +03:00
Eli Zaretskii
207101e169
; Fix documentation of 'auto-save-visited-remote-files'
...
* etc/NEWS:
* lisp/files.el (auto-save-visited-remote-files): Doc fix.
2022-07-05 16:07:03 +03:00
Stefan Kangas
3631355dcb
New user option auto-save-visited-remote-files
...
* lisp/files.el (auto-save-visited-remote-files): New user option.
(auto-save-visited-mode): Use above new variable to decide whether
or not to save remote files. (Bug#41333)
2022-07-05 14:51:21 +02:00
Stefan Kangas
ac7f76528f
New user option auto-save-visited-mode-predicate
...
* lisp/files.el (auto-save-visited-mode-predicate): New defcustom.
(auto-save-visited-mode): Use above new variable as a predicate to
decide whether or not to save a buffer.
2022-07-05 14:05:43 +02:00
Stefan Kangas
77d90ce79a
Merge from origin/emacs-28
...
d5e1424174
Expand docstrings related to auto-saving
2022-07-05 06:30:40 +02:00
Stefan Kangas
d5e1424174
Expand docstrings related to auto-saving
...
* lisp/files.el (auto-save-visited-mode):
* lisp/simple.el (auto-save-mode): Expand docstring.
2022-07-05 00:30:09 +02:00
Eli Zaretskii
603de9a38e
; Fix documentation of 'file-parent-directory'
...
* doc/lispref/files.texi (Directory Names):
* lisp/files.el (file-parent-directory): Improve wording of the
documentation of 'file-parent-directory'. (Bug#56355)
2022-07-04 14:59:58 +03:00
Daanturo
1ac383bcb6
Add file-parent-directory function
...
* doc/lispref/files.texi: Document the function.
* etc/NEWS: Add its entry.
* lisp/emacs-lisp/shortdoc.el: Add it to 'file-name' group.
* lisp/files.el: implementation (bug#56355).
2022-07-04 13:07:51 +02:00
Zachary Kanfer
772b189143
Add new command `rename-visited-file'
...
* doc/emacs/files.texi (Save Commands): Document it.
* lisp/files.el (rename-visited-file): New command (bug#56229).
2022-06-28 14:15:47 +02:00
Lars Ingebrigtsen
502e861af7
Don't create HOME if it doesn't exist
...
* lisp/files.el (locate-user-emacs-file): Don't create HOME if it
doesn't exist (bug#47298). This returns us to Emacs 26.3
behaviour here.
2022-06-26 14:34:59 +02:00
Lars Ingebrigtsen
b6238a26c9
Revert "Fix some byte-compilation warnings about subr-x"
...
This reverts commit cd479aa8bd
.
This led to build failures when doing bootstraps.
2022-06-25 00:19:23 +02:00
Lars Ingebrigtsen
cd479aa8bd
Fix some byte-compilation warnings about subr-x
...
* lisp/term/haiku-win.el (require):
* lisp/replace.el (require):
* lisp/progmodes/elisp-mode.el (require):
* lisp/isearch.el (require):
* lisp/files.el (require): Require subr-x when compiling.
2022-06-24 14:35:23 +02:00
Lars Ingebrigtsen
03124c4201
Fix .dir-local.el caching for symlinks
...
* lisp/files.el (dir-locals-read-from-dir): We want the time stamp
of the actual file, not the time stamp of the symlink (if
.dir-locals.el is a symlink) (bug#46122).
2022-06-14 15:01:44 +02:00
Stefan Monnier
86f30c972b
* files.el (auto-mode-alist): Add entry to .eld
files
2022-06-13 08:58:09 -04:00
Lars Ingebrigtsen
980009e84c
Make find-sibling-file-search non-private
...
* lisp/files.el (find-sibling-file-search): Rename to be non-private.
(find-sibling-file): Adjust call.
2022-06-12 12:08:41 +02:00
Eli Zaretskii
dc5f6dcee2
Fix "C-x C-d" with wildcard arguments
...
* lisp/files.el (list-directory): Make sure 'default-directory' is
set to a valid value if the argument DIRNAME included wildcards.
(Bug#55877)
2022-06-12 13:03:32 +03:00
Lars Ingebrigtsen
81a586282d
Fix find-sibling-file doc string
...
* lisp/files.el (find-sibling-file): Remove incorrect statement
from doc string (bug#55879).
2022-06-10 11:45:28 +02:00
Lars Ingebrigtsen
7ee736a884
Allow specifying a wildcard argument to list-directory again
...
* lisp/files.el (list-directory): Allow specifying a wildcard
argument interactively again (bug#55877).
2022-06-10 10:22:33 +02:00
Stefan Kangas
1766609309
Merge from origin/emacs-28
...
d02c94090c
Fix error reporting in process-async-https-with-delay
9a4862a973
* doc/misc/org.org: Remove spurious markup.
768ed1476a
Make Tramp version check more robust
7f778c6943
Fix debugging with GDB when a breakpoint has multiple loca...
25e53e9391
; * lisp/files.el (file-expand-wildcards): Doc fix.
3ea9357d10
Update documentation of 'aset' and 'store-substring'
# Conflicts:
# lisp/files.el
2022-06-10 08:17:35 +02:00
Lars Ingebrigtsen
6a9ff1c638
Demote extended attribute errors in basic-save-buffer-2
...
* lisp/files.el (basic-save-buffer-2): Give demoted errors when
reading extended attributes that fail (bug#43723).
2022-06-07 20:03:41 +02:00
Lars Ingebrigtsen
7edf3d2902
Make find-file-noselect not pick buffers with broken symlinks
...
* lisp/files.el (find-buffer-visiting): Improve doc string.
(find-file-noselect): Don't pick buffers with broken symlinks,
because that's too confusing (bug#41414).
2022-06-06 15:49:36 +02:00
Lars Ingebrigtsen
5f12e288a5
Improve find-sibling-file error reporting
...
* lisp/files.el (find-sibling-file): Improve error reporting.
2022-06-06 14:34:50 +02:00
Stefan Monnier
5ee4209f30
cl-typep: Emit warning when using a type not known to be a type
...
`cl-typep` has used a heuristic that if there's a `<foo>-p` function,
then <foo> can be used as a type. This made sense in the past where
most types were not officially declared to be (cl-)types, but nowadays
this just encourages abuses such as using `cl-typecase` with
"types" like `fbound`. It's also a problem for EIEIO objects, where
for historical reasons `<foo>-p` tests if the object is of type
exactly `<foo>` whereas (cl-typep OBJ <foo>) should instead test
if OBJ is a *subtype* of `<foo>`.
So we change `cl-typep` to emit a warning whenever this "-p" heuristic
is used, to discourage abuses, encourage the use of explicit
`cl-deftype` declarations, and try and detect some misuses of
`<foo>-p` for EIEIO objects.
* lisp/emacs-lisp/eieio.el (defclass): Define as type not only at
run-time but also for the current compilation unit.
* lisp/emacs-lisp/eieio-core.el (class, eieio-object): Define as types.
* lisp/emacs-lisp/cl-preloaded.el (cl-struct-define): Don't abuse the
"-p" heuristic.
* lisp/emacs-lisp/cl-macs.el (cl-deftype-satisfies):
Add entries for frames, windows, markers, and overlays.
(cl-typep): Emit a warning when using a predicate that is not known to
correspond to a type.
* lisp/files.el (file-relative-name): Fix error that can trigger if
there's an(other) error between loading `files.el` and loading
`minibuffer.el`.
2022-06-06 00:04:00 -04:00
Lars Ingebrigtsen
408fa62148
Add new command find-sibling-file
...
* doc/emacs/files.texi (Visiting): Document it.
* lisp/files.el (file-expand-wildcards): Fix up the regexp expansion.
(find-sibling-rules, find-sibling-file): New user option and command.
(find-sibling-file--search): New helper function.
2022-06-05 15:49:29 +02:00
Eli Zaretskii
25e53e9391
; * lisp/files.el (file-expand-wildcards): Doc fix.
2022-06-05 16:40:22 +03:00
Lars Ingebrigtsen
d8924e179e
Extend file-expand-wildcards to allow regexps
...
* doc/lispref/files.texi (Contents of Directories): Document it.
* lisp/files.el (file-expand-wildcards): Extend to allow regexps.
* lisp/emacs-lisp/shortdoc.el (file): Expand the
file-expand-wildcards example.
2022-06-05 14:08:31 +02:00
Stefan Kangas
d46e94f23f
Merge from origin/emacs-28
...
1b8719835a
Update to Org 9.5.4
92c5faafd7
Clarify documentation of 'string-to-unibyte'
2848512654
; * lisp/files.el (find-file): Avoid too short lines in do...
672f9f787f
Improve keystrokes in doc strings in some find-file functions
ef5651cc77
Fix segfaults when starting on 80x26 TTY frames
bfa647972f
; Fix doc string of 'delete-selection-repeat-replace-region'
a95d46e00f
Make it explicit that a couple of _s in lispref are unders...
5c74c25123
Remove from FAQ the MS-Windows info about BDF fonts
edb48646f2
Fix Display Property manual example
2022-06-05 06:30:25 +02:00
Eli Zaretskii
2848512654
; * lisp/files.el (find-file): Avoid too short lines in doc string.
2022-06-02 16:04:38 +03:00
Ikumi Keita
672f9f787f
Improve keystrokes in doc strings in some find-file functions
...
* lisp/files.el (find-file):
(find-file-other-window):
(find-file-other-frame): Include the correct keymap so that
keystrokes are displayed better (bug#55761).
Copyright-paperwork-exempt: yes
2022-06-02 14:29:53 +02:00
Lars Ingebrigtsen
1cfb89dc79
Allow extending 'save-some-buffers'
...
* lisp/abbrev.el (abbrev--possibly-save): Separated out from
`save-some-buffers'.
(save-some-buffers-functions): Add to the save function.
* lisp/files.el (save-some-buffers-functions): New variable.
(save-some-buffers): Use it.
(save-buffers-kill-emacs): Also use it to see if we have something
to save (bug#55579).
2022-05-23 09:45:35 +02:00
Lars Ingebrigtsen
1030cc1897
Fix regression with multiple mode: entries in the prop line
...
* lisp/files.el (hack-local-variables): Fix regression with multiple
mode: entries in the prop line.
Do not merge to master.
2022-04-19 18:08:20 +02:00
Lars Ingebrigtsen
e45abc832d
Fix regression with multiple mode: entries in the prop line
...
* lisp/files.el (hack-local-variables--find-variables): Use the
final mode: line (which is the same as having several mode: bits
in the header line.
2022-04-19 18:06:31 +02:00