1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-25 09:20:59 -08:00
Commit graph

149293 commits

Author SHA1 Message Date
João Távora
67a9ecb489 Remove interactive spec from internal eldoc--format-doc-buffer
Per bug#43609.

* lisp/emacs-lisp/eldoc.el (eldoc--format-doc-buffer): Remove
useless interactive spec.
2020-12-08 23:40:23 +00:00
Stefan Monnier
be0f2de179 * src/fns.c (hash_string): Speed up on large strings 2020-12-08 18:08:54 -05:00
Lars Ingebrigtsen
ca50519900 term.el comment update
* lisp/term.el: Fix wrong command name in the comments (bug#7041).
2020-12-08 23:41:24 +01:00
Serge Tupchii
2d8f0364fc Fix crash (segfault) in etags on generating tags for Erlang files
* lib-src/etags.c: Set allocated and lastlen to zero, after
freeing last ptr in Erlang_functions to prevent dereferencing NULL
pointer (bug#45122).
Copyright-paperwork-exempt: yes
2020-12-08 21:22:34 +01:00
Lars Ingebrigtsen
1fb099ceb0 Make rcirc nick renaming heed nickname max lengths
* lisp/net/rcirc.el (rcirc-server-parameters): New variable (bug#6795).
(rcirc-connect): Set it.
(rcirc-handler-433): Use the length from the server.
(rcirc-handler-005): Collect server data.
(rcirc-server-parameter-value): New utility function.
(rcirc--make-new-nick): New function.
2020-12-08 18:22:47 +01:00
Lars Ingebrigtsen
ef711b1556 Make hexl scrolling commands work more like the normal ones
* lisp/hexl.el (hexl-scroll-down):
(hexl-scroll-up): Heed `next-screen-context-lines' (bug#7031).
2020-12-08 17:57:10 +01:00
Lars Ingebrigtsen
3440bd0d53 Fix scrolling in hexl-mode when ruler-mode is on
* lisp/hexl.el (hexl-scroll-down):
(hexl-scroll-up): Take ruler-mode into account when computing the
number of lines (bug#7031).  These commands would previously jump
one line too many by default, skipping one line.
2020-12-08 17:48:44 +01:00
Eli Zaretskii
26b198cef9 Improve documentation of 'backtrace-on-error-noninteractive'
* src/eval.c (syms_of_eval) <backtrace-on-error-noninteractive>:
Format the doc string according to conventions.

* etc/NEWS: Improve formatting and wording of the entry describing
'backtrace-on-error-noninteractive.
2020-12-08 18:43:09 +02:00
Lars Ingebrigtsen
38c9b0bbdd Make the history traversal functions in coming more regular
* lisp/comint.el (comint-previous-matching-input): Allow restoring
the input on wraps (bug#7885).
(comint-previous-matching-input-from-input): Restore input on wraps.
2020-12-08 17:15:41 +01:00
Boruch Baum
db9549d0dd Make table-fixed-width-mode work again
* lisp/textmodes/table.el (table--update-cell): Make
table-fixed-width-mode work (bug#18183).
2020-12-08 14:38:44 +01:00
Lars Ingebrigtsen
06168c124d Use the proper face for the Gnus mode line id
* lisp/gnus/gnus-sum.el (gnus-set-mode-line):
* lisp/gnus/gnus-group.el (gnus-group-set-mode-line): Use the
mode-line-buffer-id face on the buffer id.
2020-12-08 14:20:10 +01:00
Lars Ingebrigtsen
fbb9dd3e82 Simplify gnus-mode-line-buffer-identification
* lisp/gnus/gnus.el (gnus-mode-line-image-cache): Remove.
(gnus-mode-line-buffer-identification): Use the find-image cache.
2020-12-08 14:17:36 +01:00
Lars Ingebrigtsen
ab4b90723e Cache toolbar icon data paths
* lisp/image.el (find-image): Add an optional CACHE parameter.
(find-image--cache): New variable.

* lisp/tool-bar.el (tool-bar--image-expression): Use cached data
to avoid looking up the image files on each refresh.
2020-12-08 13:57:44 +01:00
Stefan Kangas
19c0afd0ad ; * lisp/timezone.el: Fix typo in lexical-binding cookie.
Reported by Xu Chunyang <xuchunyang56@gmail.com>.
2020-12-08 11:26:33 +01:00
Stefan Kangas
bdf8dd25e6 Prefer setq-local in grep.el
* lisp/progmodes/grep.el (grep-process-setup, grep-mode): Prefer
setq-local.
2020-12-08 11:26:33 +01:00
Stefan Kangas
afe1605939 Prefer setq-local in meta-mode.el
* lisp/progmodes/meta-mode.el (meta-common-mode, metafont-mode)
(metapost-mode): Prefer setq-local.
2020-12-08 10:36:16 +01:00
Stefan Kangas
f33ce525b1 Prefer setq-local in compile.el
* lisp/progmodes/compile.el (compile-command, compilation-start)
(compilation-mode, compilation-setup, compilation-filter)
(compilation-forget-errors): Prefer setq-local.
2020-12-08 10:36:16 +01:00
Stefan Kangas
1c75ca109d * admin/nt/dist-build/build-dep-zips.py: Remove unused import. 2020-12-08 09:30:55 +01:00
Stefan Kangas
3b20c03316 Prefer setq-local in tests
* test/lisp/allout-tests.el (allout-test-resumption-prior-value-resumed)
(allout-test-resumption-multiple-holds)
(allout-test-resumption-unbinding):
* test/lisp/emacs-lisp/faceup-resources/faceup-test-mode.el
(faceup-test-mode):
* test/lisp/epg-tests.el (with-epg-tests):
* test/src/data-tests.el (binding-test-buffer-A): Prefer setq-local.
2020-12-08 08:57:22 +01:00
Stefan Kangas
9e7b93f2da Prefer setq-local in term.el
* lisp/term.el (term-mode, term-exec, term-emulate-terminal)
(term-process-pager): Prefer setq-local.
2020-12-08 08:52:57 +01:00
Stefan Kangas
095a41ed89 Prefer setq-local in shell.el
* lisp/shell.el (shell-completion-vars, shell-mode): Prefer
setq-local.
2020-12-08 08:52:42 +01:00
Stefan Kangas
db001f8dab Prefer setq-local in speedbar.el
* lisp/speedbar.el (speedbar-frame-mode, speedbar-mode)
(speedbar-add-localized-speedbar-support): Prefer setq-local.
2020-12-08 08:52:42 +01:00
Stefan Kangas
6614b67d9e Prefer setq-local in newcomment.el
* lisp/newcomment.el (comment-inline-offset)
(comment-normalize-vars): Prefer setq-local.
2020-12-08 08:52:42 +01:00
Stefan Kangas
07b317cb4c * lisp/locate.el (locate, locate-mode): Prefer setq-local. 2020-12-08 08:52:42 +01:00
Stefan Kangas
0d6fca3093 * lisp/array.el (array-mode): Prefer setq-local. 2020-12-08 08:52:42 +01:00
Stefan Kangas
478368ad4f Prefer setq-local in simple.el
* lisp/simple.el (read-extended-command, goto-history-element)
(minibuffer-history-isearch-setup, read-shell-command)
(visual-line-mode, completion-setup-function, read-only-mode)
(visible-mode): Prefer setq-local.
2020-12-08 08:52:42 +01:00
Philipp Stephani
0155bd0fdb Fix bug in how ERT invokes its debugger.
The debugger needs to receive a list of the error symbol and data;
cf. the documentation of the `debugger' variable.  This bug manifested
itself in ERT forms such as (should (integerp (ert-fail "Boo"))),
which resulted in an incorrect condition object.  Note that forms such
as (should (ert-fail "Boo")) weren't affected because they wouldn't
use the `ert--should-signal-hook'.

* test/emacs-lisp/ert.el (ert--should-signal-hook): Call debugger with
the right arguments.

* test/lisp/emacs-lisp/ert-tests.el (ert-test-fail-inside-should): Add
unit test.
2020-12-07 21:41:40 +01:00
Lars Ingebrigtsen
0c330bed24 Avoid problems when calling desktop-read twice
* lisp/desktop.el (desktop-read): Don't reload the desktop file if
it's already been loaded, because the later query may lead to
desktop-dirname being set to nil (bug#9765).
2020-12-07 18:53:55 +01:00
Lars Ingebrigtsen
8b1693f689 Make previous Fkill_emacs change safer
* src/emacs.c (Fkill_emacs): Don't run `kill-emacs-hook' if it's nil.
2020-12-07 17:26:53 +01:00
Basil L. Contovounesios
1537a8c863 ; Fix recent typos/wording in NEWS and server.el 2020-12-07 16:07:41 +00:00
Daniel Martín
6e0080e755 Add commands xref-next-group and xref-prev-group
* lisp/progmodes/xref.el (xref-next-group): New command that navigates
to the first item of the next xref group (typically a file).
(xref-prev-group): New command that navigates
to the first item of the next xref group (typically a file).
(xref--xref-buffer-mode-map): Bound the new commands to 'N' and 'P',
respectively.
* doc/emacs/maintaining.texi (Xref Commands): Document the new
commands in the Emacs manual.
* etc/NEWS: Announce them (bug#45089).
2020-12-07 17:01:35 +01:00
Alyssa Ross
13651833c7 Only use the comint environment in comint-derived modes
* lisp/progmodes/compile.el (compilation-start): Only use the
comint environment in comint-derived modes (bug#45095).

Copyright-paperwork-exempt: yes
2020-12-07 16:58:15 +01:00
Stefan Kangas
60cf0aa21c Prefer setq-local in calendar/*.el
* lisp/calendar/calendar.el (calendar-mode):
* lisp/calendar/diary-lib.el (diary-list-entries, diary-mode):
(diary-fancy-display-mode): Prefer setq-local.
2020-12-07 16:45:46 +01:00
Stefan Kangas
d174a2bb23 Prefer setq-local in gnus/*.el
* lisp/gnus/gnus-agent.el (gnus-agent-mode)
(gnus-agent-get-undownloaded-list, gnus-agent-open-history):
* lisp/gnus/gnus-art.el (gnus-article-setup-highlight-words)
(gnus-article-mode, gnus-article-setup-buffer, defsubst)
(gnus-article-describe-bindings, gnus-article-edit-mode):
* lisp/gnus/gnus-cus.el (gnus-custom-mode, gnus-group-customize)
(gnus-score-customize, gnus-agent-customize-category):
* lisp/gnus/gnus-group.el (gnus-group-make-tool-bar):
* lisp/gnus/gnus-msg.el (gnus-setup-message)
(gnus-summary-news-other-window, gnus-configure-posting-styles):
* lisp/gnus/gnus-salt.el (gnus-pick-mode, gnus-binary-mode):
* lisp/gnus/gnus-score.el (gnus-score-edit-current-scores)
(gnus-score-edit-file):
* lisp/gnus/gnus-srvr.el (gnus-server-mode):
* lisp/gnus/gnus-start.el (gnus-no-server-1)
(gnus-dribble-read-file, gnus-save-newsrc-file)
(gnus-gnus-to-newsrc-format):
* lisp/gnus/gnus-sum.el (gnus-summary-make-tool-bar)
(gnus-summary-mode, gnus-summary-setup-buffer)
(gnus-select-newsgroup, gnus-summary-edit-article)
(gnus-summary-setup-default-charset):
* lisp/gnus/gnus-topic.el (gnus-topic-mode):
* lisp/gnus/gnus-undo.el (gnus-undo-mode):
* lisp/gnus/gnus.el (gnus-simplify-mode-line):
* lisp/gnus/message.el (message-cite-reply-position)
(message-cite-style, message-mode, message-setup-fill-variables):
* lisp/gnus/mm-view.el (mm-display-inline-fontify):
* lisp/gnus/mml.el (mml-mode):
* lisp/gnus/nndiary.el (nndiary-open-nov):
* lisp/gnus/nnfolder.el (nnfolder-save-buffer)
(nnfolder-open-nov):
* lisp/gnus/nnheader.el (nnheader-init-server-buffer):
* lisp/gnus/nnimap.el (nnimap-make-process-buffer):
* lisp/gnus/nnml.el (nnml-get-nov-buffer): Prefer setq-local.
2020-12-07 16:45:33 +01:00
Andrea Corallo
be907b0ba8 * Spawn a sub-process for running GCC also in batch mode (bug#45056)
* lisp/emacs-lisp/comp.el (comp-async-compilation): New variable.
	(comp-final): Always run the C side of the compilation as a
	sub-process unless during bootstrap or async compilation.
	(comp-run-async-workers): Set `comp-async-compilation'.
2020-12-07 16:43:01 +01:00
Lars Ingebrigtsen
3ee94cc7bb Insert skeletons at the correct point
* lisp/skeleton.el (skeleton-read): Don't insert the skeleton at
an arbitrary point if the user moves around (bug#17752).
2020-12-07 16:36:09 +01:00
Lars Ingebrigtsen
b218c8b6b5 Allow shutting down Emacs even if there are errors in kill-emacs-hook
* lisp/subr.el (run-hook-query-error-with-timeout): New function
(bug#28542).

* src/emacs.c (Fkill_emacs): Use it to allow exiting Emacs even if
there are errors in kill-emacs-hook.
(syms_of_emacs): Define the symbol.
2020-12-07 15:40:23 +01:00
Lars Ingebrigtsen
9cef8fc8cd Ensure that new emacsclient frames has focus
* lisp/server.el (server-execute): Focus the frame here...
(server-switch-buffer): Instead of here (bug#15469).  This ensures
that the frame has focus if Emacs is querying the user about
something when opening a file (for instance "Revert from file?").
2020-12-07 14:29:46 +01:00
Lars Ingebrigtsen
ff5a3c74fc Allow inhibiting the instructions on how to close emacsclient frames
* doc/emacs/misc.texi (Invoking emacsclient): Document it.
* lisp/server.el (server-client-instructions): New variable.
(server-execute): Use it.
2020-12-07 13:53:24 +01:00
Illia Ostapyshyn
78017a6e59 Allow using newer versions of Gnuplot from calc again
* lisp/calc/calc-graph.el (calc-graph-plot): Don't use the "time"
abbreviation for "timestamp" (bug#39232) -- it's no longer valid
after
b979b5371b

Copyright-paperwork-exempt: yes
2020-12-07 13:37:44 +01:00
Lars Ingebrigtsen
e74f60fde0 Fix file name quoting problems in tex-mode
* lisp/textmodes/tex-mode.el (tex--quote-spec): New function
(bug#14286).
(tex-format-cmd): Use it.
(tex-compile): Don't quote the file names, because we're using
`file-exists-p' and friends on the results later, and that fails
on systems where everything is quoted, and on file names that need
quoting.
2020-12-07 13:37:44 +01:00
Lars Ingebrigtsen
3568ff084c Clarify icomplete-show-matches-on-no-input doc string
* lisp/icomplete.el (icomplete-show-matches-on-no-input): Clarify
doc string (bug#19031), suggested by Andrii Kolomoiets.
2020-12-07 13:37:44 +01:00
Lars Ingebrigtsen
de7a741c7b Revert "Clarify icomplete-show-matches-on-no-input doc string"
This reverts commit f352c57972.

The new explanation of what icomplete does is wrong.
2020-12-07 13:37:44 +01:00
Mattias Engdegård
d6d871a1a2 Calc: simplify integer log2 and power of 2
We have bignums and fast primitives now; no caches are needed.

* lisp/calc/calc-bin.el (math-power-of-2-cache)
(math-big-power-of-2-cache): Remove.
(math-power-of-2, math-integer-log2): Simplify.
(calcFunc-ash): Don't call math-power-of-2 with negative argument.
2020-12-07 13:18:00 +01:00
Mattias Engdegård
5d04ee5085 * doc/misc/calc.texi (Predefined Units): Prune outdated kg text. 2020-12-07 13:17:59 +01:00
Philipp Stephani
2d989e81b7 Unbreak a few unit tests that rely on lack of backtraces
* test/lisp/emacs-lisp/gv-tests.el (gv-dont-define-expander-in-file)
(gv-dont-define-expander-other-file):
* test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-with-default-config):
Suppress backtraces in batch mode to unbreak unit tests.
2020-12-07 11:59:06 +01:00
Philipp Stephani
3970f4ac40 Add new variable to selectively suppress backtraces in batch mode.
* src/eval.c (syms_of_eval): Define new variable
'backtrace-on-error-noninteractive' to selectively enable backtrace
printing in batch mode.
(signal_or_quit): Use it.

* etc/NEWS: Document new variable.

* test/src/eval-tests.el (eval-tests/backtrace-in-batch-mode/inhibit):
New unit test.
2020-12-07 11:59:06 +01:00
Stefan Kangas
2187b805d1 * lisp/ielm.el (inferior-emacs-lisp-mode): Prefer setq-local. 2020-12-07 11:19:15 +01:00
Stefan Kangas
6e0cac17b5 * lisp/ibuffer.el (ibuffer, ibuffer-mode): Prefer setq-local. 2020-12-07 11:16:37 +01:00
Stefan Kangas
8a42354b0a Prefer setq-local in whitespace.el
* lisp/whitespace.el (whitespace-turn-on, whitespace-color-on): Prefer
setq-local.
2020-12-07 11:14:22 +01:00