* etc/NEWS: Fix capitalization and markup.
* lisp/emacs-lisp/ert.el (ert--should-error-handle-error): Prefer
any over cl-some where either will do.
* lisp/epa-file.el (epa-file--find-file-not-found-function):
Reindent.
(epa-file--error-add-context): Use correct variables. Add
docstring.
* lisp/ffap.el (ffap-machine-p):
* lisp/gnus/nnmaildir.el (nnmaildir--emlink-p): Prefer
string-equal-ignore-case over case fiddling.
* lisp/gnus/gnus-search.el (gnus-search-run-query): Fix typo in
error re-signaling.
* lisp/ibuffer.el (ibuffer-confirm-operation-on): Prefer string
search over regexp matching where either will do.
* test/lisp/vc/vc-tests/vc-tests.el
(vc-test--run-maybe-unsupported-function): Pacify unused
condition-case error variable warnings (bug#72212).
Remove `error-data` from the new error API: it is not really
compatible with a more abstract view of error descriptors, and
in practice it seems to be used only in two ways (both of them rare):
- To add some contextual info to an error. We should maybe add
a dedicated support for that, but it's not clear what shape it
should take, ideally (there was a discussion about with Alan
and myself in emacs-devel a few years ago).
- To do some other massaging whose correctness is dubious anyway.
* doc/lispref/control.texi (Handling Errors): Remove `error-data`.
* lisp/epa-file.el (epa-file--find-file-not-found-function): Don't use
`error-data`.
(epa-file--error-add-context): New function, extracted from
`epa-file-insert-file-contents`.
(epa-file-insert-file-contents): Use it instead of `error-data`.
* lisp/subr.el (error-data): Delete function.
* lisp/epa-file.el (epa-file--find-file-not-found-function):
Use `error-slot-value` and `error-data`.
(epa-file-insert-file-contents): Use `error-has-type-p`,
`error-slot-value`, and `error-data`.
* lisp/jka-compr.el (jka-compr-insert-file-contents):
Use `error-has-type-p` and `error-slot-value` as well as new
re-signaling form of `signal`.
* lisp/simple.el (minibuffer-error-function): Use `error-has-type-p`.
* lisp/startup.el (startup--load-user-init-file):
Use `error-message-string`.
(command-line): Use `error-has-type-p` and `error-message-string`.
* lisp/type-break.el (type-break-demo-life):
Use `error-message-string`.
* lisp/emacs-lisp/bytecomp.el (batch-byte-compile-file):
Use `error-message-string` and `error-has-type-p`.
* lisp/emacs-lisp/edebug.el (edebug-safe-eval, edebug-report-error)
(edebug-eval-expression):
* lisp/emacs-lisp/debug.el (debugger-eval-expression):
Use `error-message-string`.
* lisp/emacs-lisp/ert.el (ert--should-error-handle-error):
Use `error-has-type-p` and `error-type`.
* lisp/net/sasl.el (sasl-error): Use `define-error`.
* lisp/net/tramp-compat.el (tramp-error-type-p): New function.
(tramp-permission-denied, tramp-compat-permission-denied): Use it.
* lisp/progmodes/elisp-mode.el (elisp-completion-at-point):
Use `error-type-p`.
* lisp/xt-mouse.el (turn-on-xterm-mouse-tracking-on-terminal)
(turn-off-xterm-mouse-tracking-on-terminal): Use `error-slot-value`.
* lisp/simple.el (next-line, previous-line): Remove useless
`condition-case` handler, and hence the whole `condition-case`, and
then simplify.
* lisp/gnus/nnrss.el (nnrss-insert): Use `with-demoted-errors`.
* lisp/gnus/nnmaildir.el (nnmaildir--emlink-p, nnmaildir--enoent-p)
(nnmaildir--eexist-p): Use `error-has-type-p`.
(nnmaildir--new-number, nnmaildir-request-set-mark): Use single-arg
`signal`.
* lisp/ffap.el (ffap-machine-p): Use `error-slot-value`.
* lisp/emacs-lisp/comp.el (comp--native-compile):
Use `error-has-type-p` as well as single-arg `signal`.
* lisp/net/ange-ftp.el (ange-ftp-hook-function): Use single-arg
`signal`.
* lisp/ebuff-menu.el (electric-buffer-menu-looper): Use `error-has-type-p`.
* lisp/progmodes/ebrowse.el (ebrowse-electric-list-looper):
Use `error-has-type-p`.
(ebrowse-electric-position-looper): Make it an alias of
`ebrowse-electric-list-looper`.
* lisp/ibuffer.el (ibuffer-confirm-operation-on):
* lisp/ls-lisp.el (ls-lisp--insert-directory):
* lisp/gnus/gnus-search.el (gnus-search-run-query):
* lisp/mail/mail-extr.el (mail-extr-safe-move-sexp):
* lisp/net/dbus.el (dbus-set-property):
* lisp/net/eudc-export.el (eudc-bbdbify-phone):
* lisp/net/imap.el (imap-fetch-safe):
* lisp/vc/vc.el (vc-root-dir): Use `error-slot-value` and
single-arg `signal` to re-signal.
Define new functions to manipulate error descriptors and
add support for `signal` to *re*signal a previous error.
* src/eval.c (Fsignal): Make the second arg optional and document
the possibility of passing a whole error descriptor to re-signal it.
(signal_or_quit): Fix a few corner case issues when
DATA is `nil` and ERROR_SYMBOL is an error descriptor.
* lisp/subr.el (error-type-p, error--p, error-type, error-data)
(error-has-type-p, error-slot-value): New function.
* doc/lispref/control.texi (Handling Errors): Prefer "error descriptor"
to "error description". Use the new single-arg call to `signal` to
re-throw an error.
Document `error-type`, `error-data` and `error-slot-value`.
(Error Symbols): Document the new functions `error-type-p` and
`error-has-type-p`.
* lisp/simple.el (next-line, previous-line): Remove useless
`condition-case` handler, and hence the whole `condition-case`, and
then simplify.
* lisp/emacs-lisp/comp.el (comp--error-add-context): New function.
(comp--native-compile): Use it.
* lisp/gnus/nnrss.el (nnrss-insert): Use `with-demoted-errors`.
* lisp/textmodes/emacs-news-mode.el (emacs-news-find-heading):
HEADING must be a complete line, otherwise we have false positives
and false negatives. (Bug#80569)
* lisp/progmodes/flymake.el (flymake-goto-next-error): Use
cl-member-if not member-if and cl-plusp not plusp because this
is a `:core' ELPA package (bug#79930).
* lisp/progmodes/flymake.el (flymake-diagnostics-buffer-mode-map):
Only bind 'n' and 'p' when 'next-error-this-buffer-no-select' is
defined. For releasing on ELPA (bug#79930).
Bump the package version to 1.4.4.
* lisp/startup.el (startup-insert-newcomers-theme): Factor out
new function from 'normal-no-mouse-startup-screen'.
(normal-mouse-startup-screen, normal-no-mouse-startup-screen):
Call new function.
* lisp/emacs-lisp/shortdoc.el (keymaps): Add example for adding
key bindings to an existing keymap.
* lisp/keymap.el (define-keymap): Doc fix. (Bug#80556)
* src/keyboard.c (kbd_buffer_get_event): Ignore selection-request
events when accessing the frame of an event. Suggested by dick
r. chiang <dick.r.chiang@gmail.com>. (Bug#80558)
Support calls to ns_lisp_to_color or Fns_list_colors in headless
environments where ns_term_init is not called, and calls before
ns_term_init runs.
* src/emacs.c (main): Call ns_init_colors when not in dump mode.
* src/nsfns.m (ns_init_colors): Make public function.
(Fns_list_colors): Remove ns_init_colors call.
* src/nsterm.h: extern ns_init_colors.
* src/frame.c (delete_frame): Call 'get-mru-frame' safely and
with EXCLUDE-FRAME argument set up correctly.
* lisp/frame.el (get-mru-frames, get-mru-frame): Fix doc-strings.
* lisp/recentf.el (recentf-exclude-ignored-extensions): Doc fix.
(recentf-exclude-file-by-extension-p): Rename from
`recentf-exclude-ignored-extensions'; all references changed.
Doc fix.
* etc/NEWS: Improve wording of the entry which announces the
above.
* lisp/recentf.el (recentf-exclude-ignored-extensions): New
user option.
(recentf-exclude-ignored-extensions): New function.
* etc/NEWS: Announce the new option and function.
(Bug#80347)
* lisp/vc/vc-dispatcher.el (vc-display-failed-async-commands):
New user option.
(vc-do-async-command): Use it.
* doc/emacs/vc1-xtra.texi (General VC Options):
* etc/NEWS: Document it.
* lisp/vc/vc-dispatcher.el (vc-do-command): Adjust message to
begin "Failed" not "Done" when command exits non-zero.
* lisp/vc/vc.el (vc-checkin): Adjust message to end in
"...failed" not "...done" when async command exits non-zero.
* doc/misc/viper.texi: Fix weird use of indexing, whereby many
index entries were placed _after_ the table which described the
functions or variables or keys, or even in the end of a @node
describing some subject. The index entries were moved to _before_
the text to which they pertain. Also, fix some incorrect
cross-references.