1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-12 22:40:46 -08:00
Commit graph

78074 commits

Author SHA1 Message Date
Lars Ingebrigtsen
7fe7efe0bb cua-toggle-global-mark doc string clarification
* lisp/emulation/cua-gmrk.el (cua-toggle-global-mark): Clarify
that also inserted characters are affected (bug#8083).
2021-01-20 18:52:21 +01:00
Michael Albinus
bd423b8699 Fix environment handling in tramp-handle-make-process
* lisp/net/tramp.el (tramp-test-message): Add `tramp-suppress-trace' property.
(tramp-handle-make-process): Handle also 'tramp-remote-process-environment'.
2021-01-20 18:51:52 +01:00
Gabriel do Nascimento Ribeiro
38173af10d Respect remember-save-after-remembering on remember-diary-extract-entries
* lisp/textmodes/remember.el (remember-diary-extract-entries):
Save automatically if `remember-save-after-remembering' is non-nil
(bug#45811).
2021-01-20 17:54:43 +01:00
Gabriel do Nascimento Ribeiro
edf6350e7f Add option remember-text-format-function
* lisp/textmodes/remember.el (remember-text-format-function): New
variable (bug#45809).
(remember-append-to-file): Use it.
2021-01-20 17:53:04 +01:00
Gabriel do Nascimento Ribeiro
72d4522b05 Add option remember-diary-regexp
* lisp/textmodes/remember.el (remember-diary-extract-entries): Use
it (bug#45808).
(remember-diary-regexp): New variable.
2021-01-20 17:45:08 +01:00
Lars Ingebrigtsen
cad2c4b14a Tweak tty-find-type to allow TERM=screen.xterm
* lisp/faces.el (tty-find-type): Allow TERM=screen.xterm to find
term/screen.el (bug#45824).
2021-01-20 17:25:40 +01:00
Lars Ingebrigtsen
f30cf07ecb Make symbol-at-point return nil if there's no symbols in the buffer
* lisp/thingatpt.el (thing-at-point--beginning-of-symbol): Special
op that errors out when there's no symbols in the buffer before
point (bug#14234).
(symbol): Use it.
2021-01-20 16:58:09 +01:00
Fabrice Bauzac
849fe71de7
Sort Ibuffer filename/process column as displayed
* lisp/ibuf-ext.el (ibuffer-do-sort-by-filename/process): Use the
same function for sorting and for displaying the
filename/process (Bug#45800).

Copyright-paperwork-exempt: yes
2021-01-20 14:10:09 +00:00
Lars Ingebrigtsen
8b33b76eb9 Revert "Make `symbol-at-point' work in buffers with no symbols"
This reverts commit 40a5df8143.

This fails when a point is after a symbol, and there's
nothing else in the buffer.
2021-01-20 05:44:16 +01:00
Lars Ingebrigtsen
c502cdd2b7 Don't add Content-Type when ceasing an rmail edit
* lisp/mail/rmailedit.el (rmail-cease-edit): Take an optional
parameter to avoid altering the message (bug#13327).
(rmail-abort-edit): Use it.
2021-01-20 05:08:56 +01:00
Lars Ingebrigtsen
40a5df8143 Make `symbol-at-point' work in buffers with no symbols
* lisp/thingatpt.el (thing-at-point--end-of-symbol): New function
(bug#14234).
(symbol): Use it instead of `forward-symbol', because the latter
will move to the end of the buffer even if there is no symbol
there.  Instead error out like `forward-sexp' and friends.
2021-01-20 04:44:18 +01:00
Lars Ingebrigtsen
5aff1bfdaf Make sh-mode use `auto-mode-interpreter-regexp'
* lisp/progmodes/sh-script.el (sh-mode): Use
`auto-mode-interpreter-regexp' instead of open-coding the value
(bug#17158).
2021-01-20 03:25:46 +01:00
Dmitry Gutov
8725f7690a Declare some project commands interactive-only
* lisp/progmodes/project.el (project-async-shell-command)
(project-shell-command, project-compile):
Declare interactive-only (bug#45765).
2021-01-19 21:50:11 +02:00
Juri Linkov
eec059b124 * lisp/help-fns.el: Move defvar keymap-name-history closer to where it's used. 2021-01-19 20:27:29 +02:00
Juri Linkov
e718d3a849 Better check for nil in search-/query-replace-highlight-submatches (bug#45973)
* lisp/isearch.el (isearch-highlight):
* lisp/replace.el (replace-highlight):
Use integer-or-marker-p to check matches.
2021-01-19 20:13:48 +02:00
Mattias Engdegård
bfa140d7cf Calc: use Unicode brackets in Big mode when available (bug#45917)
* lisp/calc/calccomp.el (math--big-bracket-alist)
(math--big-bracket, math--comp-bracket, math--comp-round-bracket):
New.
(math-compose-expr, math-compose-log, math-compose-log10)
(math-compose-choose, math-compose-integ, math-compose-sum)
(math-compose-prod): Use big brackets when available.
2021-01-19 19:00:09 +01:00
Stefan Monnier
039ab602cb * etc/NEWS.19: Add entry for indent-line-to
* lisp/version.el (emacs-major-version, emacs-minor-version):
Remove redundant version info already displayed by `C-h o`.
2021-01-19 12:53:42 -05:00
Michael Albinus
f3b9d5b315 Some Tramp fixes, resulting from test campaign
* doc/misc/tramp.texi (Remote shell setup): Clarifications for
`tramp-actions-before-shell' example.

* lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory): Do not expand
FILENAME explicitely.
(tramp-open-shell): Add "-i" for interactive shells.

* test/lisp/net/tramp-tests.el (tramp-test07-file-exists-p)
(tramp-test14-delete-directory)
(tramp-test43-asynchronous-requests): Skip for MS windows.
2021-01-19 18:45:55 +01:00
Stefan Monnier
deb90c893d * lisp/startup.el: Fix bug#45857, bug#30994, and bug#45913.
(command-line): Don't re-evaluate the `custom-delayed-init-variables`
a second time after reading the `early-init.el` file.
(x-apply-session-resources): Set `blink-cursor-mode` rather than
`no-blinking-cursor`.

* lisp/frame.el (blink-cursor-start): Turn `blink-cursor-mode` off
if `blink-cursor-mode` was set to nil.
(blink-cursor-mode): Default to it being enabled regardless of
`window-system`.

* lisp/custom.el (custom-initialize-delay): Fox docstring now that
autoload.el preserves the `:initialize` info.
2021-01-19 12:10:48 -05:00
Lars Ingebrigtsen
3c58443855 Only show "2x entries" i vc log buffers if needed
* lisp/vc/vc.el (vc-print-log-setup-buttons): Only show the "more"
buttons if we got more or equal to the number of entries we asked
for (bug#18959).
2021-01-19 17:26:01 +01:00
Mattias Engdegård
5369b69bd8 Parse square root sign in embedded Calc mode
* lisp/calc/calc-lang.el (math-read-big-rec): Recognise √ since it may
be used in Big mode.
2021-01-19 16:11:51 +01:00
Mattias Engdegård
297edbebec Missing dynamic variable declarations in Calc
* lisp/calc/calc-embed.el (calc-embedded-set-modes): Prevent
the-language and the-display-just from being lexically bound here,
because they may be assigned using 'set'.
2021-01-19 16:11:51 +01:00
Lars Ingebrigtsen
3b731b123d Fix slow abbrev expansion in `message-mode' in some circumstances
* lisp/gnus/message.el (message--syntax-propertize): Use the
correct Message mode syntax table to avoid having
`message-cite-prefix-regexp' trigger very heavy backtracing when
called from an abbrev context (which defines "_" as a word
constituent) (bug#45944).
2021-01-19 16:07:54 +01:00
Lars Ingebrigtsen
e544b86343 Don't stop Gnus startup on password failures
* lisp/gnus/nntp.el (nntp-send-authinfo): Don't signal an
`nntp-authinfo-rejected' error, because that will stop Gnus
startup (bug#45855).  Instead signal an error that will be caught
higher up.
2021-01-19 15:54:45 +01:00
Mauro Aranda
f2f06b0209 Fix list-colors-print handling of callback arg
* lisp/facemenu.el (list-colors-print): Keeping
backward-compatibility, don't fail when passed a closure object as
CALLBACK.  (Bug#45831)
2021-01-19 09:25:00 -03:00
Drew Adams
ba0cf1d701 Tweaks to the color widget (Bug#45829)
* lisp/wid-edit.el (widget-color-match, widget-color-validate): New
functions.
(color): Use the new functions.  Base size on longest defined color
name, defaulting to the longest RGB hex string.
2021-01-19 09:11:18 -03:00
Protesilaos Stavrou
b62a1e358b Add 'perl-non-scalar-variable' face to perl-mode
* etc/NEWS: Document the new face (bug#45840).
* lisp/progmodes/perl-mode.el (perl-non-scalar-variable): Define new
face.
(perl-font-lock-keywords-2): Apply 'perl-non-scalar-variable' face.
2021-01-19 08:11:39 +01:00
James N. V. Cash
4e64d02356 Define keymap-name-history
* lisp/help-fns.el (keymap-name-history): Define the history
variable (bug#45879).  This avoids problems in other completing
systems like Helm.

Copyright-paperwork-exempt: yes
2021-01-19 07:07:37 +01:00
Lars Ingebrigtsen
378a01e168 Actually make the calc trail window dedicated
* lisp/calc/calc.el (calc-trail-display): Actually make the trail
window dedicated (bug#45928).
2021-01-19 06:05:53 +01:00
Lars Ingebrigtsen
43982a8f10 Don't infloop in comint-redirect-results-list-from-process
* lisp/comint.el (comint-redirect-results-list-from-process):
Ensure forward progress (bug#45950).
2021-01-19 05:13:03 +01:00
Lucas Werkmeister
973799f179 Mark the various nxml flags as safa
* lisp/nxml/nxml-mode.el (nxml-char-ref-display-glyph-flag)
(nxml-sexp-element-flag, nxml-slash-auto-complete-flag)
(nxml-child-indent, nxml-attribute-indent)
(nxml-bind-meta-tab-to-complete-flag)
(nxml-prefer-utf-16-to-utf-8-flag)
(nxml-prefer-utf-16-little-to-big-endian-flag)
(nxml-default-buffer-file-coding-system)
(nxml-auto-insert-xml-declaration-flag): Add :safe to allow easier
cusomization (bug#45969).
2021-01-19 04:47:14 +01:00
Lars Ingebrigtsen
f844ce69cd Revert "* .gitignore: add src/fingerprint.c"
This reverts commit 2644353cbc.

The src/fingerprint.c file is no longer generated, and the spelling of the obsolete function was correct.
2021-01-19 04:29:56 +01:00
Dmitry Gutov
4ca808ee7a Make sure the new window is not too tall
* lisp/progmodes/xref.el (xref-show-definitions-buffer-at-bottom):
Make sure the new window is not too tall (bug#45945).
2021-01-19 03:05:44 +02:00
Eric Abrahamsen
20add1cd22 Allow gnus-retrieve-headers to return headers directly
Previously, all Gnus backends returned header information by writing
nov lines into the nntp-server-buffer, which was later parsed.  This
commit allows the backends to return their header information as a
list of already-parsed headers, though so far none of the backends
actually do that.  The agent, cache, cloud etc. now operate on parsed
headers rather than nov text, ie. they use gnus-fetch-headers instead
of gnus-retrieve-headers.

* lisp/gnus/gnus-sum.el (gnus-fetch-headers): Handle the case in which
gnus-retrieve-headers returns headers directly.
* lisp/gnus/nnvirtual.el (nnvirtual-retrieve-headers): Use
gnus-fetch-headers rather than gnus-retrieve-headers to get headers,
meaning we're operating on already-parsed headers.
(nnvirtual-convert-headers): Remove now-unnecessary function.
(nnvirtual-update-xref-header): Rewrite to operate on parsed header.
* lisp/gnus/gnus-cloud.el (gnus-cloud-available-chunks): Use
gnus-fetch-headers instead of gnus-retrieve-headers.
* lisp/gnus/gnus-cache.el (gnus-cache-retrieve-headers): Use
gnus-fetch-headers.
(gnus-cache-braid-nov, gnus-cache-braid-heads): Delete unnecessary
functions -- we now do this work on a list of parsed headers.
* lisp/gnus/gnus-agent.el (gnus-agent-retrieve-headers): Use
gnus-fetch-headers.
(gnus-agent-braid-nov): Remove unnecessary function.
(gnus-agent-fetch-headers): Use gnus-fetch-headers.
2021-01-18 13:05:36 -08:00
Basil L. Contovounesios
8f4b3b812a
Fix ibuffer-mark-by-file-name-regexp abbreviations
* lisp/ibuffer.el (ibuffer--abbreviate-file-name): New function.
(filename): Use it.
* lisp/ibuf-ext.el (ibuffer-mark-by-file-name-regexp): Prefer
read-regexp over read-string for reading regexps.  Determine file
name using ibuffer-buffer-file-name for consistency.  Abbreviate
file name using ibuffer-directory-abbrev-alist (bug#18859).
2021-01-18 17:58:42 +00:00
Basil L. Contovounesios
bdb9889f78
Use format-prompt in read-regexp.
* lisp/replace.el (read-regexp): Use format-prompt (bug#12443).
2021-01-18 17:58:42 +00:00
Eric Ludlam
9214402791 * lisp/cedet/ede/proj.el: Enable Project files to load
(ede-proj-target-makefile): Give more precise type for its `rules` slot.

* lisp/cedet/ede/base.el (ede-target-list): Don't define.
(ede-project): Use `list-of` instead.
2021-01-18 12:49:11 -05:00
Eli Zaretskii
b2e6ed4026 Fix recent changes for Cham script
* lisp/language/cham.el ("Cham"): Fix sample-text.
* lisp/leim/quail/cham.el: Really install this new file.
2021-01-18 19:17:59 +02:00
Lars Ingebrigtsen
f9dab61272 Don't double up keys in epa--list-keys
* lisp/epa.el (epa--list-keys): Delete the list keys before
redisplaying (bug#44134).
2021-01-18 17:35:55 +01:00
Stephen Berman
455f08c095 Fix problem with `epa-list-keys' bugging out
* lisp/epa.el (epa--list-keys): Partially revert 517285f7ca which
removed the wrong property (bug#44134).
2021-01-18 17:29:41 +01:00
Eli Zaretskii
b215e83a78 Improve support for the Cham script and languages
* etc/NEWS: Announce the new 'cham' input method.
* etc/HELLO: Fix the order of letters in the Cham greeting.
Remove redundant newlines (reported by Ulrich Mueller
<ulm@gentoo.org>).

* lisp/language/cham.el ("Cham"): Add input-method entry.
* lisp/leim/quail/cham.el: New file.
* lisp/international/fontset.el (setup-default-fontset): Add an
entry for Cham.
2021-01-17 16:53:54 +02:00
Stefan Monnier
25e1b73294 * lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Use pcase 2021-01-16 14:21:57 -05:00
Stefan Monnier
0ab56a4e93 * lisp/emacs-lisp/pcase.el: Add support for not to pred
(pcase--split-pred, pcase--funcall): Adjust for `not`.
(pcase--get-macroexpander): New function.
(pcase--edebug-match-macro, pcase--make-docstring)
(pcase--macroexpand): Use it.

* lisp/emacs-lisp/radix-tree.el (radix-tree-leaf): Use it!

* doc/lispref/control.texi (The @code{pcase} macro): Document it.

* lisp/emacs-lisp/ert.el (ert--explain-equal-rec): Remove redundant test.
2021-01-16 14:21:57 -05:00
Eli Zaretskii
66756df286 Fix Rmail summary for more than 99,999 messages
* lisp/mail/rmailsum.el (rmail-summary-font-lock-keywords): Don't
assume there will be less than 100,000 messages in an mbox file.
(Bug#45912)
2021-01-16 20:18:32 +02:00
Eli Zaretskii
378ce65a0d Improve support for Cham script
* lisp/language/cham.el ("Cham"): Expand the entry.

* etc/HELLO: Add entry for Cham.
2021-01-16 16:54:01 +02:00
Stefan Monnier
0732fc3193 * lisp/frame.el Don't activate blink-cursor-idle-timer needlessly.
(blink-cursor-mode): Use `blink-cursor-check` rather than
`blink-cursor--start-idle-timer` so we check for the presence of
a frame where the cursor can be blinked before activating the idle timer.
2021-01-15 23:18:08 -05:00
Kévin Le Gouguec
1513ee37a4 Change default-directory before prompting in project-compile
This causes command completion to work from the project root, letting
users complete top-level folders, make targets, etc (bug#45765).

* lisp/progmodes/project.el (project-compile): Simplify using
call-interactively, as done with project(-async)-shell-command.
2021-01-16 06:00:22 +02:00
Basil L. Contovounesios
f45be48ddb
; Remove recent spurious addition in window.el
* lisp/window.el (display-buffer-use-some-window): Remove spurious
message included in 2021-01-11 "Support using auth-source for
NickServ passwords in ERC" (bug#45340#44).
2021-01-15 21:46:54 +00:00
Stephen Leake
2644353cbc * .gitignore: add src/fingerprint.c
* lisp/dired-x.el (dired-file-name-at-point): Fix spelling in obsolete
message.
2021-01-15 10:03:06 -08:00
Jared Finder
66ac17289a Make libraries works with xterm-mouse-mode.
Change calls from 'read-event' to 'read-key' in libraries expecting
mouse events.  Do this only when 'xterm-mouse-mode' is enabled.  That
way those libraries read decoded mouse events instead of the
underlying escape sequence.  Add a parameter to 'read-key' that avoids
running any of the unbound fallbacks in 'read-key-sequence' so the
libraries can read mouse button-down events.

For backward compatibility purposes, the above logic is contained in a
new internal-only function: 'read--potential-mouse-event'.

* doc/lispref/commands.texi (Reading One Event): Document new
parameter to 'read-key'.  Mention that non-character events on
terminals need 'read-key'.
* lisp/subr.el (read-key-full-map): Add new keymap used by 'read-key'.
(read-key): Add new parameter 'fallbacks-disabled' to prevent running
any of the unbound fallbacks normally run by 'read-key-sequence'.
(read--potential-mouse-event): Add new function that calls 'read-key'
or 'read-event' depending on if 'xterm-mouse-mode' is set.
* lisp/foldout.el (foldout-mouse-swallow-events):
* lisp/isearch.el (isearch-pre-command-hook):
* lisp/mouse-drag.el (mouse-drag-throw, mouse-drag-drag):
* lisp/mouse.el (mouse-drag-secondary):
* lisp/ruler-mode.el (ruler-mode-mouse-grab-any-column)
(ruler-mode-mouse-drag-any-column-iteration):
* lisp/strokes.el (strokes-read-stroke, strokes-read-complex-stroke):
* lisp/textmodes/artist.el (artist-mouse-draw-continously)
(artist-mouse-draw-poly, artist-mouse-draw-2points):
* lisp/vc/ediff-wind.el (ediff-get-window-by-clicking):
* lisp/wid-edit.el (widget-button--check-and-call-button)
(widget-button-click): Call 'read--potential-mouse-event' instead of
'read-event'.
* lisp/wid-edit.el (widget-key-sequence-read-event): Call 'read-key'
with 'fallbacks-disabled' set instead of 'read-event'.  Unlike above
changes, this is unconditionally applied so it works for function
keys too.  Apply 'local-function-key-map' instead of
'function-key-map' as that contains the full terminal translations.
* lisp/vc/ediff.el (ediff-windows): Use 'display-mouse-p' to check if
a mouse is available.
* src/lread.c (Fread_event): Recommend 'read-key' in docstring for
'read-event' for non-character events.
2021-01-15 13:50:07 +02:00