1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-07 20:30:32 -08:00
Commit graph

148560 commits

Author SHA1 Message Date
João Távora
05ab6e53e2 Improve icomplete-vertical-mode and fido-vertical-mode
This mode is intended to be used with Icomplete ('M-x icomplete-mode')
or Fido ('M-x fido-mode'), to display the list of completions
candidates vertically instead of horizontally.  When used with
Icomplete, completions are rotated and selection kept at the top.
When used with Fido, completions scroll like a typical dropdown
widget.

If the dropdown behaviour is desired for Icomplete (instead of
rotation), icomplete-scroll can be adjusted separately by the user.

* etc/NEWS (icomplete-vertical-mode): Reword.

* lisp/icomplete.el (simple): Require it.
(icomplete-selected-match): New face.
(icomplete-scroll): New user-visible var.
(icomplete-forward-completions): Rework.
(icomplete-backward-completions): Rework.
(icomplete--fido-mode-setup): Prefer icomplete-scroll according to
icomplete-vertical mode.
(icomplete-minibuffer-setup): Initialize icomplete--scrolled-completions.
(fido-vertical-mode): An alias for icomplete-vertical-mode.
(icomplete-exhibit): Init icomplete--scrolled-past.  Adjust overlay.
(icomplete--render-vertical): New helper.
(icomplete--sorted-completions): If cache is stale, also
invalidate icomplete--scrolled-past.
(icomplete-completions): Rework.  Mostly reformat.

* lisp/simple.el (max-mini-window-lines): New helper.
(display-message-or-buffer): Use it.
2021-06-01 10:40:54 +01:00
Lars Ingebrigtsen
062f5aa640 Allow packages to change the hl-line overlay priority
* lisp/hl-line.el (hl-line-overlay-priority): New variable
(bug#11509).
(hl-line-make-overlay): Use it.
2021-06-01 10:29:33 +02:00
Lars Ingebrigtsen
d9ccc3fa2a Fix problem with `format-alist' marking all the text in the buffer
* lisp/format.el (format-decode-run-method): Use it to avoid
marking the entire buffer (bug#11691).

* lisp/simple.el (shell-command-on-region): Allow replacing text
without activating the mark.
2021-06-01 10:22:57 +02:00
Lars Ingebrigtsen
43a9c3f725 Document `with-selected-frame'
* doc/lispref/windows.texi (Selecting Windows): Document
`with-selected-frame' (bug#12075).
2021-06-01 09:41:40 +02:00
Lars Ingebrigtsen
0a7ca6fc3f Obsolete `global-whitespace-newline-mode'
* lisp/whitespace.el (global-whitespace-newline-mode): Make
obsolete since it doesn't work correctly, and seems superfluous
(bug#12496).
2021-06-01 09:15:13 +02:00
Lars Ingebrigtsen
85e17196fa Add a new command `mailcap-view-file'
* doc/misc/emacs-mime.texi (mailcap): Document it (bug#12972).

* lisp/net/mailcap.el (mailcap-view-file): New command.
2021-06-01 08:55:06 +02:00
Lars Ingebrigtsen
78f885f370 Fix documentation of literal `face' syntax in font-lock section
* doc/lispref/modes.texi (Search-based Fontification): Fix
the literal `(0 (face ...))' syntax documentation (bug#13917).
2021-06-01 07:57:09 +02:00
Philip Kaludercic
23b6cd41f5 Improve random selection of keyservers
* epa-ks.el (epa-keyserver): Interpret a list as a pool.
(epa-ks--query-url): Add new auxiliary function.
(epa-ks--fetch-key): Use epa-ks--query-url.
(epa-search-keys): Use epa-ks--query-url.
2021-06-01 07:49:10 +02:00
Juri Linkov
ef07d0b8c7 * lisp/isearch.el (lazy-highlight-buffer-max-at-a-time): Change from 20 to 200
Suggested by Augusto Stoffel <arstoffel@gmail.com> in bug#48581
2021-05-31 23:32:50 +03:00
Andrea Corallo
8992a45202 * Make *Async-native-compile-log* buffer read-only (bug#48763)
* lisp/emacs-lisp/comp.el (comp-run-async-workers): Make
"*Async-native-compile-log*" read-only.
2021-05-31 20:52:45 +02:00
Alan Mackenzie
2ee5ce208f Make frames record when their selected window was the mini-window
When a frame in this state is selected again by Fselect_frame (but not by
Fselect_window), the mini-window rather than the frame's currently selected
window, is chosen for selection, should there still be an active minibuffer in
it.

This fixes bug #48674.

* src/frame.h (struct frame): Add new boolean field select_mini_window_flag.

* src/frame.c (make_frame): Initialize select_mini_window_flag to false.
(do_switch_frame): Set the new flag appropriately for the old frame, and
process the new frame's setting of this flag, before setting it to false.

* src/window.c (select_window): Set f->select_mini_window_flag to false.
(Fset_frame_selected_window, Fdelete_other_windows_internal)
(Fdelete_window_internal): Add comments clarifying that there is no clearing
of f->select_mini_window_flag in these functions.
2021-05-31 16:24:11 +00:00
Glenn Morris
63e9a4b1e1 * src/keyboard.c (make_lispy_event): Fix previous. 2021-05-31 08:40:26 -07:00
Glenn Morris
b7c1b81ffb Merge from origin/emacs-27
5dfa5e26dd (origin/emacs-27) Improve documentation of regexp ranges
2021-05-31 07:50:34 -07:00
Alan Mackenzie
6e2d3bce08 Correct mouse handling when window origin changes between down and up events
Do this by using frame relative positions rather than window relative ones,
which gave rise to spurious drag events when the origin of the window changed
between the mouse down and up events.  This fixes bug #48409.

* keyboard.c (frame_relative_event_pos): New static variable.
(make_lispy_event): Record frame relative position of down event.  When the up
event is in the same position, "move" this event into the window of the down
event when this window (typically a mini-window) is no longer under the mouse.
Call make_lispy_position a second time to generate this changed event.
(syms_of_keyboard): Declare Qwindow_edges.  static_pro
frame_relative_event_pos.
2021-05-31 10:33:10 +00:00
Colin Woodbury
0b1dfb5de6 Remove spurious @example from the elisp manual
* doc/lispref/macros.texi (Defining Macros): Remove spurious extra
pair of @example/@end example.

Copyright-paperwork-exempt: yes
2021-05-31 10:55:37 +02:00
Lars Ingebrigtsen
9c8bef5134 Remove messaging in ediff-make-diff2-buffer
* lisp/vc/ediff-diff.el (ediff-make-diff2-buffer): Remove message
that's often misleading when diffing buffers (that may be unsaved)
(bug#13091).
2021-05-31 10:24:23 +02:00
Lars Ingebrigtsen
d51e6af9a7 Put ELP results in a special-mode buffer
* lisp/emacs-lisp/elp.el (elp-results): Make `q' work in ELP
results buffer (bug#14104).
(elp-results-mode): Define as an empty special mode derivation.
2021-05-31 08:17:00 +02:00
Lars Ingebrigtsen
2009832a82 Make `menu-bar-select-buffer' obsolete
* lisp/menu-bar.el (menu-bar-select-buffer): Make obsolete (bug#15651).

* lisp/msb.el (msb--select-buffer): Move function here and rename.
(msb--make-keymap-menu): Use it.
2021-05-31 07:29:51 +02:00
Lars Ingebrigtsen
0dc195b4fe Revert "Move menu-bar-select-buffer to msb.el"
This reverts commit 253e52478c.

This is to be fixed in a different way in the next patch.
2021-05-31 07:25:25 +02:00
Lars Ingebrigtsen
415ae812e9 Use buffer-local-boundp in describe-variable
* lisp/help-fns.el (describe-variable): Use `buffer-local-boundp'.
2021-05-31 07:22:12 +02:00
Lars Ingebrigtsen
77f67d12f6 Add new convenience function `buffer-local-boundp'
* doc/lispref/variables.texi (Creating Buffer-Local): Document it.
* lisp/subr.el (buffer-local-boundp): New function.

* src/data.c (Flocal_variable_p): Mention it.
2021-05-31 07:21:09 +02:00
Daniel Mendler
db91108315 Speed up `describe-variable' completion predicate
* lisp/help-fns.el (describe-variable): Do not switch to the original
buffer in the predicate (bug#48738).
2021-05-31 06:49:37 +02:00
Lars Ingebrigtsen
7733076638 Fix error in xdg-mime-apps-files when XDG_CURRENT_DESKTOP is defined
* lisp/xdg.el (xdg-mime-apps-files): Don't bug out when
XDG_CURRENT_DESKTOP is bound (bug#48748).
2021-05-31 06:36:23 +02:00
Philipp Stephani
ed72a8ccd5 Document that the 'syntax-propertize-function' may move point.
The functions generated by 'syntax-propertize-rules' don't use
'save-excursion', but 'syntax-propertize' does, so we might as well
document that the 'syntax-propertize-function' may move point.

* doc/lispref/syntax.texi (Syntax Properties): Document that the
'syntax-propertize-function' may move point.
2021-05-30 22:42:40 +02:00
Philipp Stephani
3988411f6c Give 'syntax-propertize-wholelines' a docstring.
This function is generally useful.

* lisp/emacs-lisp/syntax.el (syntax-propertize-wholelines): Add
docstring.
2021-05-30 22:38:48 +02:00
Stephen Gildea
a5b57fc6af time-stamp: fix minor bug when parsing option combos
* lisp/time-stamp.el (time-stamp-string-preprocess): Handle digit
options correctly to avoid overcounting colon options.

* test/lisp/time-stamp-tests.el (time-stamp-format-time-zone-offset):
Add a new test case that would have caught the option-parsing error.
2021-05-30 11:05:42 -07:00
Stephen Gildea
d6dc66053d time-stamp: refactor time-stamp-string-preprocess
* lisp/time-stamp.el (time-stamp-string-preprocess):  Reduce lifetime of
some loop-local variables to be less error-prone.
2021-05-30 09:11:03 -07:00
Mauro Aranda
15f46b9669 Do not reset settings when disabling a theme
* lisp/custom.el (disable-theme): Don't call custom-push-theme, since
that resets the theme settings and it isn't useful: we only need to
remove the theme setting from the themed variable or face.  This fixes
a regression when "toggling" themes, introduced while fixing Bug#34027.
(Bug#48736)
2021-05-30 09:35:13 -03:00
Eli Zaretskii
5dfa5e26dd Improve documentation of regexp ranges
* doc/lispref/searching.texi (Regexp Special): Document the effect
of using octal escapes in regexp ranges.  (Bug#17758)
2021-05-30 13:20:02 +03:00
Eli Zaretskii
23ad0f0c5a Don't account for character compositions in 'format' and friends
'lisp_string_width' is called from 'format' and 'format-message',
which can be called both very early into Emacs initialization and in
other contexts where using the font backend is impossible or
undesirable.  So this commit changes 'lisp_string_width' to try
accounting for automatic compositions only when explicitly requested,
and only 'string-width' does that; 'format' and 'format-message'
don't.
* src/character.c (lisp_string_width): Accept an additional
argument AUTO_COMP; attempt accounting for auto-compositions only
if that argument is non-zero.  (Bug#48732)
* src/editfns.c (styled_format):
* src/character.c (Fstring_width): Callers of 'lisp_string_width'
adjusted.
2021-05-30 11:16:59 +03:00
Lars Ingebrigtsen
7671d47078 Clarify that `symbol-file' only works for symbols in Lisp files
* lisp/subr.el (symbol-file): Mention help-C-file-name in the doc
string (bug#14932).
2021-05-30 08:25:18 +02:00
Lars Ingebrigtsen
c8ec798d70 Allow help-C-file-name to work on symbols designating subrs
* lisp/help-fns.el (help-C-file-name): Allow working on symbols
designating subrs (bug#14932).
2021-05-30 08:25:06 +02:00
Lars Ingebrigtsen
db1de74e73 Fix kmacro-view-ring-2nd doc string
* lisp/kmacro.el (kmacro-view-ring-2nd): Fix doc string (bug#15020).
2021-05-30 08:10:15 +02:00
Lars Ingebrigtsen
253e52478c Move menu-bar-select-buffer to msb.el
* lisp/menu-bar.el (menu-bar-select-buffer): Move from
here... (bug#15651).
* lisp/msb.el (menu-bar-select-buffer): ... to here (which is the
only usage in-tree in Emacs).
2021-05-30 08:06:08 +02:00
Stephen Gildea
9e705206ac time-stamp: improve unit-test coverage
* test/lisp/time-stamp-tests.el (time-stamp-format-year-4digit,
time-stamp-format-ignored-modifiers): Improve coverage with more cases.
(time-stamp-format-multiple-conversions): New test.
2021-05-29 22:56:43 -07:00
Lars Ingebrigtsen
fdfb3df92a `minibuffer-exit-hook' doc string clarification
* src/minibuf.c (syms_of_minibuf): `minibuffer-exit-hook' is run
in the minubuffer usually, so don't claim that it's run after
(bug#16524).
2021-05-30 07:06:48 +02:00
Daniel Martín
e247b4b691 Add a new documentation group for overlays
* lisp/emacs-lisp/shortdoc.el (overlay): Add documentation group for
buffer overlays(bug#48730).
2021-05-30 06:41:52 +02:00
Daniel Martín
1230651ffd Improve the documentation of documentation groups
* doc/lispref/help.texi (Documentation Groups): Fix typos and add an
example.
* lisp/emacs-lisp/shortdoc.el (define-short-documentation-group): Add
:no-eval* and :result-string keywords to the docstring.  (Bug#48730)
2021-05-30 06:41:24 +02:00
Lars Ingebrigtsen
b0d01982e2 Tweak octave continuation indentation
* lisp/progmodes/octave.el (octave-smie-rules): Further tweak
continuation indentation (bug#17955).
2021-05-30 06:25:47 +02:00
Eli Zaretskii
a4c922d84f Clarify indent-line-function doc string
* lisp/indent.el (indent-line-function): Clarify by avoiding
specifics (bug#20846).
2021-05-30 06:11:02 +02:00
Stefan Monnier
c97716e9a2 * lisp/mpc.el (mpc-format): Fix inf-loop in constructed predicate 2021-05-29 14:24:23 -04:00
Andreas Schwab
1855e3d0c4 * lisp/wdired.el (wdired-normalize-filename): Sync with
dired-get-filename.  (Bug#48659)
2021-05-29 15:37:58 +02:00
Stefan Monnier
246a41759c * lisp/electric.el: Do auto-indent inside strings and comments by default
This fixes bug#20846 where it transpired that there is no good reason
to shy away from auto-indenting inside comments and strings.

(electric-indent-post-self-insert-function): Don't check syntax-ppss.
2021-05-29 09:22:57 -04:00
Keith David Bershatsky
4d4c73da5a Improve tex fontification of quoted strings
* lisp/textmodes/tex-mode.el (tex-font-lock-keywords-2): Fontify
``text like this'' that has an apostrophe correctly (bug#16881).
2021-05-29 13:45:59 +02:00
Eli Zaretskii
e3fc16fd71 Fix last change
* lisp/international/quail.el (quail-add-unread-command-events):
Fix wording of the doc string.  Move the rationale for the
function out of the doc string and into a comment.
2021-05-29 11:17:53 +03:00
Gregory Heytings
bd5c740419 Fix key recording bug when an input method is activated
* lisp/international/quail.el (quail-add-unread-command-events):
New function.
(quail-start-translation, quail-start-conversion)
(quail-update-translation, quail-next-translation)
(quail-prev-translation, quail-next-translation-block)
(quail-prev-translation-block, quail-minibuffer-message): Use
'quail-add-unread-command-events' (and partly revert commit
03e3440dbb).  (Bug#48042)

* lisp/subr.el (inhibit--record-char): Now obsolete.

* lisp/term/xterm.el (xterm--init): New function, with most of the
code of former 'terminal-init-xterm'.
(terminal-init-xterm): Clear the lossage after terminal
initialization (see Bug#44908).
(xterm--read-event-for-query): Do not use 'inhibit--record-char'
anymore (revert commit 3e6525d69f).

* src/keyboard.c (syms_of_keyboard): Remove 'inhibit--record-char'
(partly revert 03e3440dbb).
(record_char, syms_of_keyboard_for_pdumper): Do not use
'inhibit_record_char anymore'.
2021-05-29 11:05:33 +03:00
Mattias Engdegård
7bbd6b720e ; * etc/NEWS: Slight improvement of last entry 2021-05-29 09:32:49 +02:00
Mattias Engdegård
0cbfb7e795 ; * lisp/emacs-lisp/rx.el (rx--pcase-macroexpander): slight rephrase 2021-05-29 09:18:01 +02:00
Mattias Engdegård
61961903fd ; * lisp/mail/rmail.el (rmail-simplified-subject): Dodge relint nag 2021-05-29 09:18:01 +02:00
Mattias Engdegård
93162efd79 Fix shortdoc examples
Make sure that each example in shortdoc actually contains the function
it illustrates, and add a test for it.

* lisp/emacs-lisp/shortdoc.el (string, list, buffer, number):
Use the right functions in examples for string-version-lessp,
lax-plist-put, point-min and ffloor.
* test/lisp/emacs-lisp/shortdoc-tests.el: New test file.
2021-05-29 09:18:00 +02:00