summaryrefslogtreecommitdiff
path: root/lisp/files.el
Commit message (Collapse)AuthorAgeFilesLines
...
* | Fix compilation warnings in tramp-loaddefs.elLars Ingebrigtsen2022-07-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | Delete aliases obsolete since 21.1 and 22.1Stefan Kangas2022-07-311-2/+0
| | | | | | | | | | | | * 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.
* | Merge from origin/emacs-28Stefan Kangas2022-07-281-5/+7
|\| | | | | | | | | | | | | | | | | 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
| * ; Improve documentation of 'file-name-with-extension'Eli Zaretskii2022-07-281-5/+7
| | | | | | | | * lisp/files.el (file-name-with-extension): Doc fix. (Bug#56809)
* | string-equal-ignore-case: new functionSam Steingold2022-07-261-16/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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'.
* | Use `ash` instead of `lsh`Mattias EngdegÄrd2022-07-191-1/+1
| | | | | | | | | | | | | | | | * 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.
* | ; Fix typos: prefer American spellingStefan Kangas2022-07-141-1/+1
| |
* | Make remote-shell-program default to ssh onlyStefan Kangas2022-07-121-14/+3
| | | | | | | | | | | | | | * 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
* | Merge from origin/emacs-28Stefan Kangas2022-07-101-6/+7
|\| | | | | | | 115261b323 ; Improve wording of recently-changed doc strings.
| * ; Improve wording of recently-changed doc strings.Eli Zaretskii2022-07-091-6/+7
| | | | | | | | | | | | * lisp/simple.el (auto-save-mode): * lisp/files.el (auto-save-visited-mode): Improve wording of the doc strings.
* | Remove many items obsolete since 24.1Stefan Kangas2022-07-081-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | Prefer defcustom :safe to putting 'safe-local-variable'Stefan Kangas2022-07-061-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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'.
* | Make some additional defcustom types more restrictiveStefan Kangas2022-07-061-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | Merge from origin/emacs-28Stefan Kangas2022-07-061-2/+2
|\| | | | | | | | | 6b5d829d9d Add index entry for "ignore case" 29e1459965 ; * lisp/files.el (remote-file-name-inhibit-cache): Minor ...
| * ; * lisp/files.el (remote-file-name-inhibit-cache): Minor doc fix.Stefan Kangas2022-07-051-2/+2
| |
* | Rename new option to remote-file-name-inhibit-auto-save-visitedStefan Kangas2022-07-051-3/+4
| | | | | | | | | | | | | | * 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>.
* | ; * lisp/files.el (auto-save-visited-predicate): Doc fix.Eli Zaretskii2022-07-051-4/+5
| |
* | ; Fix documentation of 'auto-save-visited-remote-files'Eli Zaretskii2022-07-051-1/+1
| | | | | | | | | | * etc/NEWS: * lisp/files.el (auto-save-visited-remote-files): Doc fix.
* | New user option auto-save-visited-remote-filesStefan Kangas2022-07-051-0/+8
| | | | | | | | | | | | * 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)
* | New user option auto-save-visited-mode-predicateStefan Kangas2022-07-051-1/+31
| | | | | | | | | | | | * 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.
* | Merge from origin/emacs-28Stefan Kangas2022-07-051-1/+6
|\| | | | | | | d5e1424174 Expand docstrings related to auto-saving
| * Expand docstrings related to auto-savingStefan Kangas2022-07-051-1/+6
| | | | | | | | | | * lisp/files.el (auto-save-visited-mode): * lisp/simple.el (auto-save-mode): Expand docstring.
* | ; Fix documentation of 'file-parent-directory'Eli Zaretskii2022-07-041-3/+4
| | | | | | | | | | | | * doc/lispref/files.texi (Directory Names): * lisp/files.el (file-parent-directory): Improve wording of the documentation of 'file-parent-directory'. (Bug#56355)
* | Add file-parent-directory functionDaanturo2022-07-041-0/+17
| | | | | | | | | | | | | | * 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).
* | Add new command `rename-visited-file'Zachary Kanfer2022-06-281-0/+20
| | | | | | | | | | | | * doc/emacs/files.texi (Save Commands): Document it. * lisp/files.el (rename-visited-file): New command (bug#56229).
* | Don't create HOME if it doesn't existLars Ingebrigtsen2022-06-261-4/+11
| | | | | | | | | | | | * 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.
* | Revert "Fix some byte-compilation warnings about subr-x"Lars Ingebrigtsen2022-06-251-2/+1
| | | | | | | | | | | | This reverts commit cd479aa8bd498da4d7980a7fe7a37e238761482f. This led to build failures when doing bootstraps.
* | Fix some byte-compilation warnings about subr-xLars Ingebrigtsen2022-06-241-1/+2
| | | | | | | | | | | | | | | | * 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.
* | Fix .dir-local.el caching for symlinksLars Ingebrigtsen2022-06-141-1/+1
| | | | | | | | | | | | * 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).
* | * files.el (auto-mode-alist): Add entry to `.eld` filesStefan Monnier2022-06-131-0/+3
| |
* | Make find-sibling-file-search non-privateLars Ingebrigtsen2022-06-121-4/+8
| | | | | | | | | | * lisp/files.el (find-sibling-file-search): Rename to be non-private. (find-sibling-file): Adjust call.
* | Fix "C-x C-d" with wildcard argumentsEli Zaretskii2022-06-121-2/+2
| | | | | | | | | | | | * lisp/files.el (list-directory): Make sure 'default-directory' is set to a valid value if the argument DIRNAME included wildcards. (Bug#55877)
* | Fix find-sibling-file doc stringLars Ingebrigtsen2022-06-101-3/+0
| | | | | | | | | | * lisp/files.el (find-sibling-file): Remove incorrect statement from doc string (bug#55879).
* | Allow specifying a wildcard argument to list-directory againLars Ingebrigtsen2022-06-101-3/+2
| | | | | | | | | | * lisp/files.el (list-directory): Allow specifying a wildcard argument interactively again (bug#55877).
* | Merge from origin/emacs-28Stefan Kangas2022-06-101-6/+7
|\| | | | | | | | | | | | | | | | | | | | | | | 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
| * ; * lisp/files.el (file-expand-wildcards): Doc fix.Eli Zaretskii2022-06-051-5/+5
| |
* | Demote extended attribute errors in basic-save-buffer-2Lars Ingebrigtsen2022-06-071-8/+14
| | | | | | | | | | * lisp/files.el (basic-save-buffer-2): Give demoted errors when reading extended attributes that fail (bug#43723).
* | Make find-file-noselect not pick buffers with broken symlinksLars Ingebrigtsen2022-06-061-2/+14
| | | | | | | | | | | | * 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).
* | Improve find-sibling-file error reportingLars Ingebrigtsen2022-06-061-3/+9
| | | | | | | | * lisp/files.el (find-sibling-file): Improve error reporting.
* | cl-typep: Emit warning when using a type not known to be a typeStefan Monnier2022-06-061-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `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`.
* | Add new command find-sibling-fileLars Ingebrigtsen2022-06-051-4/+90
| | | | | | | | | | | | | | * 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.
* | Extend file-expand-wildcards to allow regexpsLars Ingebrigtsen2022-06-051-6/+17
| | | | | | | | | | | | | | | | * 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.
* | Merge from origin/emacs-28Stefan Kangas2022-06-051-10/+11
|\| | | | | | | | | | | | | | | | | | | | | | | 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
| * ; * lisp/files.el (find-file): Avoid too short lines in doc string.Eli Zaretskii2022-06-021-9/+8
| |
| * Improve keystrokes in doc strings in some find-file functionsIkumi Keita2022-06-021-2/+4
| | | | | | | | | | | | | | | | | | * 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
| * Fix regression with multiple mode: entries in the prop lineLars Ingebrigtsen2022-04-191-1/+1
| | | | | | | | | | | | | | * lisp/files.el (hack-local-variables): Fix regression with multiple mode: entries in the prop line. Do not merge to master.
| * Fix major-mode setting regression when there's a mode: cookieLars Ingebrigtsen2022-04-181-1/+1
| | | | | | | | | | | | | | * lisp/files.el (hack-local-variables): Fix regression in setting the major mode when there are mode: cookies in the file (bug#54993). Do not merge to master.
* | Allow extending 'save-some-buffers'Lars Ingebrigtsen2022-05-231-17/+26
| | | | | | | | | | | | | | | | | | | | | | * 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).
* | Fix regression with multiple mode: entries in the prop lineLars Ingebrigtsen2022-04-191-1/+1
| | | | | | | | | | | | * 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.
* | Allow several mode: elements in the local variable sectionLars Ingebrigtsen2022-04-191-4/+7
| | | | | | | | | | | | | | * etc/NEWS (mode): Fall back on outline-mode in older Emacsen. * 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.