1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-10 13:40:36 -08:00
Commit graph

148606 commits

Author SHA1 Message Date
Stefan Monnier
e490ffcf95 * lisp/mpc.el (mpc-intersection): Fix commit 1760029b09 2021-06-05 11:56:01 -04:00
Eli Zaretskii
58de11fe13 Document the last change
* doc/lispref/os.texi (Input Modes): Document the changes in the
values of the META flag.

* etc/NEWS: Call out the change in input-meta-mode.
2021-06-05 17:17:17 +03:00
Max Mikhanosha
515eb69895 Support terminal emulators that encode the Meta modifier as 8th bit
See discussion starting at

 https://lists.gnu.org/archive/html/emacs-devel/2021-06/msg00034.html

for the details.
* src/keyboard.c (read_decoded_event_from_main_queue): For
raw-text encoed input, if Meta bit is encoded, apply the Meta
modifier to single-byte characters that have the 0x80 bit set.
For input encoded otherwise, if the Meta bit is encoded, remove
the 0x80 bit after decoding the characters.
(tty_read_avail_input): Reset the 0x80 bit only if Meta bit is not
encoded.
(Fset_input_meta_mode): Support 'encoded' as the value of META.
(Fset_input_mode): Document 'encoded' for META.
(Fcurrent_input_mode): Support and document 'encoded' as the value
of META.
(syms_of_keyboard): DEFSYM 'encoded'.
2021-06-05 16:57:43 +03:00
Eli Zaretskii
f93f3b80dd Fix slow operation of 'string-width'
* src/composite.c (find_automatic_composition): Accept one
additional argument BACKLIM; don't look back in buffer or string
farther than that.  Add an assertion for BACKLIM.
(composition_adjust_point, Ffind_composition_internal): Callers
adjusted.
* src/composite.h (find_automatic_composition): Adjust prototype.
* src/character.c (lisp_string_width): Call
'find_automatic_composition' with the value of BACKLIM equal to POS,
to avoid costly and unnecessary search back in the string, since
those previous characters were already checked for automatic
compositions.  (Bug#48734)  (Bug#48839)
2021-06-05 14:16:06 +03:00
Eli Zaretskii
3eb294745c Some additions to the TeX input method
* lisp/leim/quail/latin-ltx.el (latin-ltx--define-rules): Add some
rules from Unicode Technical Note 28 "UnicodeMath" v3.1.
2021-06-05 11:28:26 +03:00
Dmitry Gutov
8d5b7f519f Make icomplete less blinky and more responsive
* lisp/icomplete.el (icomplete-pre-command-hook, icomplete-tidy):
Remove, update the callers
(https://lists.gnu.org/archive/html/emacs-devel/2021-06/msg00111.html).
(icomplete-compute-delay): Change the default to 150ms.
(icomplete-max-delay-chars): Change the default to 2.
2021-06-05 03:56:33 +03:00
Tassilo Horn
7b50ed553f Ask if dir and subdir dired buffers be killed when deleting dir
Previously, when you've had dired buffers

  ~/foo/
  ~/foo/bar/
  ~/foo/bar/baz/

and then deleted ~/foo/, dired (with dired-clean-up-buffers-too set to
non-nil) would only ask to delete the dired buffer of ~/foo/.  Now it
will offer to delete all three buffers.

* lisp/dired.el (dired-buffers-for-dir): Add optional argument SUBDIRS
which makes the function return also dired buffers showing a subdir of
DIR.
(dired-in-this-tree-p): Make obsolete in favor of file-in-directory-p
which actually does what the name suggest whereas dired-in-this-tree-p
is just string-matching on filenames which will fail with symlinks
filenames including ./ or ../.
2021-06-04 21:58:11 +02:00
Eli Zaretskii
4c362b4ef7 Fix documentation of a recent change.
* etc/NEWS:
* doc/emacs/misc.texi (Invoking emacsclient): Fix a recent change.
(Bug#11358)
2021-06-04 16:50:43 +03:00
Stephen Berman
194d54a929 Fix placement of point in Dired deletion operations
* lisp/dired.el (dired-do-flagged-delete, dired-do-delete): Use
point-marker instead of point to record each file name position.
Clean up the markers before returning.
(dired-internal-do-deletions): Move to the file name marker, and
then move point to the file name to visually emphasize which file
is being operated on (bug#48805).
2021-06-04 12:01:41 +02:00
Harald Hanche-Olsen
9136c064d6 Add a new `server-edit-abort' command
* doc/emacs/misc.texi (Invoking emacsclient): Document it (bug#11358).

* lisp/server.el (server-edit): Mention it in the doc string.
(server-edit-abort): New command.

Copyright-paperwork-exempt: yes
2021-06-04 11:09:46 +02:00
Lars Ingebrigtsen
6d1d048d65 Revert "Make the `i' command in Info-mode remove duplicate matches"
This reverts commit 089e0c4c55.

There were no duplicate entries -- there were two entries
for different things that referred to the same line.
2021-06-04 10:48:16 +02:00
Eli Zaretskii
b516887283 Fix documentation of recent 'windmove' changes
* lisp/windmove.el (windmove-default-keybindings)
(windmove-display-default-keybindings)
(windmove-delete-default-keybindings)
(windmove-swap-states-default-keybindings): Improve doc strings.
(Bug#41438)

* etc/NEWS: Fix a typo in the 'windmove' entry.
2021-06-04 09:48:13 +03:00
Juri Linkov
15c57fc4cc * lisp/simple.el (read-from-kill-ring): Fix the case of 'M-y M-p' (bug#48478)
Don't use offsets for read-from-kill-ring-history when kill-ring-yank-pointer
points to the last element of kill-ring.
2021-06-03 23:54:30 +03:00
Juri Linkov
d4ae640a37 * lisp/help-fns.el (help--symbol-class): New function.
Refactored from help--symbol-completion-table-affixation.
https://lists.gnu.org/archive/html/emacs-devel/2021-06/msg00066.html
2021-06-03 23:41:30 +03:00
Juri Linkov
ee56a19873 * etc/NEWS: Add windmove keybindings (bug#41438) 2021-06-03 23:36:07 +03:00
Philip Kaludercic
3916bf00c5 Add user options for default windmove commands (bug#41438)
* windmove.el (windmove--default-keybindings-type): Add type.
(windmove-default-keybindings): Add user option.
(windmove-display-default-keybindings): Add user option.
(windmove-delete-default-keybindings): Add user option.
(windmove-swap-states-default-keybindings): Add user option.
2021-06-03 23:35:10 +03:00
Philip Kaludercic
b5416d971a Improve windmove-*-default-keybindings functions (bug#41438)
* windmove.el (windmove-mode-map): Add special map for windmove commands.
(windmove-mode): Add minor mode for activating windmove-mode-map.
(windmove-install-defaults): Add general function for manipulating
windmove-mode-map.
(windmove-default-keybindings): Use windmove-install-defaults.
(windmove-display-default-keybindings): Use windmove-install-defaults.
(windmove-delete-default-keybindings): Use windmove-install-defaults.
(windmove-swap-states-default-keybindings): Use windmove-install-defaults.
2021-06-03 23:35:07 +03:00
Mattias Engdegård
6b41d7da95 Constant-propagate (function SYMBOL)
* lisp/emacs-lisp/byte-opt.el (byte-optimize--substitutable-p):
Consider #'SYMBOL a constant for compile-time propagation purposes.
2021-06-03 21:28:10 +02:00
Mattias Engdegård
a517b77ffe Optimise (cons X nil) to (list X)
* lisp/emacs-lisp/byte-opt.el (byte-optimize-cons): New function.
2021-06-03 21:28:10 +02:00
Eli Zaretskii
c3b44858dc Fix fill-column-indicator on TTY frames
* src/xdisp.c (extend_face_to_end_of_line): Fix calculation of
fill-column-indicator on TTY frames.  Suggested by Jimmy Aguilar
Mena <spacibba@aol.com>.
2021-06-03 17:45:12 +03:00
Eli Zaretskii
528e15775e More accurate highlighting of mis-spellings in Flyspell
* lisp/textmodes/flyspell.el (flyspell-word): Highlight only the
misspelled word, not any extra characters after it.  (Bug#5575)
2021-06-03 15:57:14 +03:00
Lars Ingebrigtsen
089e0c4c55 Make the `i' command in Info-mode remove duplicate matches
* lisp/info.el (Info-index): Weed out duplicate matched
(bug#3692).
2021-06-03 11:55:45 +02:00
Lars Ingebrigtsen
4bcc83c124 Fix up previous hideif change to avoid a compilation warning
* lisp/progmodes/hideif.el
(hide-ifdef-expand-reinclusion-protection): Move to avoid a
compilation warning.
2021-06-03 10:39:39 +02:00
Lars Ingebrigtsen
e0da5d639e fringe-mode doc clarifications
* lisp/fringe.el (fringe-mode):
(fringe-mode): Note that this variable and command have nothing to
do with modes (bug#6931).
2021-06-03 10:21:12 +02:00
Luke Lee
9a66aff504 * lisp/progmodes/hideif.el: Fix initial version for new variables
(hide-ifdef-verbose, hide-ifdef-evalulate-enter-hook)
(hide-ifdef-evalulate-leave-hook): Fix initial version to 28.1.
(hide-ifdef-expand-reinclusion-protection): Obsolete since 28.1,
rename to `hide-ifdef-expand-reinclusion-guard' instead.
2021-06-03 16:04:16 +08:00
Lars Ingebrigtsen
2e8212a565 Fix problem with empty command histories in eshell and `erase'
* lisp/eshell/em-hist.el (eshell-add-input-to-history): Protect
against an empty ring (bug#48770).
2021-06-03 09:50:35 +02:00
Eli Zaretskii
3272cfa8d4 ; Fix last change. 2021-06-03 10:49:09 +03:00
Eli Zaretskii
ed19ffc346 * configure.ac: Clarify "smoke test" error message. (Bug#48804) 2021-06-03 10:46:54 +03:00
Lars Ingebrigtsen
d08067d362 Cross-reference the message/error control variables
* src/keyboard.c (syms_of_keyboard): Mention set-message-function
in the command-error-function doc string...

* src/xdisp.c (syms_of_xdisp): ... and vice versa (bug#13752).
2021-06-03 09:29:55 +02:00
Eli Zaretskii
6a152f898d * configure.ac: Improve error messages about libgccjit. 2021-06-03 09:55:00 +03:00
Tassilo Horn
a488716961 Allow opening buttonized URL with secondary browser in rcirc
* lisp/net/browse-url.el (browse-url-button-open-url): Add autoload
cookie.
* lisp/net/rcirc.el (rcirc-markup-urls): Use
`browse-url-button-open-url' instead of just `browse-url' in order to
be able to use the secondary browser by giving a prefix arg.
2021-06-02 23:04:51 +02:00
Eli Zaretskii
09081ca119 Fix a typo in 'produce_glyphless_glyph'
* src/xdisp.c (produce_glyphless_glyph): Initialize lower_xoff.
Remove workaround for lack of its initialization.  (Bug#8215)
2021-06-02 16:14:14 +03:00
Luke Lee
87e7390aae * lisp/progmodes/hideif.el: update for new C++ standards and extensions
Matching gcc/clang behavior on stringification including keeping the same
number of white spaces.  C++11, C++14, C++17 and GCC literals extension are
supported.  Preprocessing time floating point operation supported but limited
to Emacs internal representation which is C data type "double".  Also support
some frequently used keywords like __LINE__, __TIME__, __DATE__ and so on.

(hif-clear-all-ifdef-defined, hif-show-all, hif-after-revert-function)
(hide-ifdef-define, hide-ifdefs, show-ifdefs): interactive behavior changes,
mainly to allow operation within the marked region.
(hif-eval, hif-__LINE__, hif-__FILE__, hif-__COUNTER__, hif-__cplusplus)
(hif-__DATE__, hif-__TIME__, hif-__STDC__, hif-__STDC_VERSION__)
(hif-__STDC_HOST__, hif-__FILE__, hif-full-match, hif-is-number, hif-is-float)
(hif-delete-char-in-string, hif-string-to-decfloat, hif-string-to-hexfloat)
(hif-strtok, hif-is-white, hif-backward-comment, hif-split-signed-token)
(hif-keep-single, hif-display-macro): new functions.
(hide-ifdef-verbose, hide-ifdef-evalulate-enter-hook)
(hide-ifdef-evalulate-leave-hook, hide-ifdef-evaluator, hif-predefine-alist)
(hif-numtype-suffix-regexp, hif-bin-regexp, hif-hex-regexp, hif-oct-regexp)
(hif-dec-regexp, hif-decfloat-regexp, hif-hexfloat-regexp)
(hif-unicode-prefix-regexp, hif-verbose-define-count): new constants or
variables.
(hif-macroref-regexp, hif-token-alist, hif-token-regexp)
(hif-string-literal-regexp): modified constants for faster regexp processing.
(hide-ifdef-expand-reinclusion-guard): renamed from
`hide-ifdef-expand-reinclusion-protection' to match commonly used term.
(hif-lookup, hif-defined, hif-string-to-number, hif-tokenize, hif-nextoken)
(hif-if-valid-identifier-p, hif-define-operator, hif-expand-token-list)
(hif-parse-exp, hif-math, hif-factor, hif-get-argument-list, hif-stringify)
(hif-token-concat, hif-mathify, hif-comma, hif-token-stringification)
(hif-token-concatenation, hif-macro-supply-arguments, hif-evaluate-macro)
(hif-find-define, hif-add-new-defines, hide-ifdef-guts, hif-undefine-symbol)
(hide-ifdef-set-define-alist, hide-ifdef-use-define-alist): modified functions
for new internal data representation, mainly for stringification and white
space preservation.  Also better error handling to report source line number
and more informative error messages.
2021-06-02 20:29:00 +08:00
Lars Ingebrigtsen
f064b23d09 Fix ibuffer auto-shrinking windows
* lisp/ibuffer.el (ibuffer-shrink-to-fit): Don't shrink all
windows, just the ibuffer one (bug#7218).
2021-06-02 10:54:37 +02:00
Lars Ingebrigtsen
7ea7e26ab1 Move point in dired buffers when handling a list of files
* lisp/dired-aux.el (dired-create-files): Advance point to the
current file (bug#8015).
2021-06-02 10:13:58 +02:00
Alex Bochannek
16793dc35a Add new user option to Gnus to allow `#' to toggle
* doc/misc/gnus.texi (Marking Groups, Setting Process Marks):
Mention the new variable.

* lisp/gnus/gnus-group.el (gnus-group-make-menu-bar): Update menu.
(gnus-group-mark-group): Support the variable.
(gnus-group-mark-update): New command.
(gnus-group-unmark-group, gnus-group-mark-region): Pass in new
parameter.

* lisp/gnus/gnus-sum.el (gnus-summary-make-menu-bar): Update menu.
(gnus-summary-mark-as-processable): Use the variable.

* lisp/gnus/gnus-topic.el (gnus-topic-mark-topic):  (bug#48683).

* lisp/gnus/gnus-topic.el (gnus-topic-mark-topic): Use the variable.

* lisp/gnus/gnus.el (gnus-process-mark-toggle): New user option.
2021-06-02 07:41:25 +02:00
Basil L. Contovounesios
4784b6eb9a ; End recently added sentences with a period. 2021-06-01 20:21:51 +01:00
Basil L. Contovounesios
5e0cf09f1e ; Bump isearch.el :version after recent change. 2021-06-01 20:13:33 +01:00
Alan Third
246e107d73 Improve performance of NS port's display on macOS
* src/nsterm.h: Update EmacsSurface definition.
* src/nsterm.m ([EmacsView focusOnDrawingBuffer]): Don't change the
CGContext's settings directly.
([EmacsView unfocusDrawingBuffer]): Don't release the context here.
(CACHE_MAX_SIZE): Add maximum cache size.
([EmacsView updateLayer]): Send a request for getContext, which will
copy the buffer and create the context if it doesn't already exist, to
the NS run loop.
([EmacsSurface initWithSize:ColorSpace:Scale:]): Add the scale factor
and if there's already a CGContext available, reuse it.
([EmacsSurface dealloc]): No longer need to release lastSurface
separately.
([EmacsSurface getContext]): Don't create more surfaces than we have
spaces for in the cache.
([EmacsSurface releaseContext]): If there's no context don't try to
release it and put currentSurface back on the cache instead of
lastSurface.
([EmacsSurface copyContentsTo:]): Don't try to copy if the source and
destination are actually the same surface.
2021-06-01 19:51:21 +01:00
Andrea Corallo
a32e65b357 * Add `native-compile-target-directory' (bug#48743)
* lisp/emacs-lisp/comp.el (native-compile-target-directory): New
variable.
(comp-spill-lap-function): Make use of.
2021-06-01 18:12:20 +02:00
Andrea Corallo
c4b02dad9b Rename batch-byte-native-compile-for-bootstrap (bug#48743)
* lisp/Makefile.in : Rename `batch-byte-native-compile-for-bootstrap'
-> `batch-byte+native-compile.
* lisp/emacs-lisp/bytecomp.el (byte+native-compile)
(byte-compile-file): Rename
`batch-byte-native-compile-for-bootstrap' ->
`batch-byte+native-compile + `byte-native-for-bootstrap' ->
`byte+native-compile'.
* lisp/emacs-lisp/comp.el (comp-spill-lap-function, comp-final)
(batch-native-compile, batch-byte+native-compile): Likewise.
* lisp/emacs-lisp/bytecomp.el (byte+native-compile)
(byte-compile-file): Likewise.
* test/src/comp-tests.el (comp-tests-bootstrap): Rename
`byte-native-for-bootstrap' -> `byte+native-compile'.
2021-06-01 18:11:37 +02:00
Glenn Morris
3dff854199 Remove unnecessary function declaration in isearch
* lisp/isearch.el (multi-isearch-switch-buffer):
Remove unnecessary declaration (after ldefs-boot update).
2021-06-01 08:52:47 -07:00
Andreas Schwab
8b3291d134 Avoid hang in nnimap-keepalive
* lisp/gnus/nnimap.el (nnimap-keepalive): Make interruptable.
2021-06-01 15:54:49 +02:00
Glenn Morris
afe7d9bd59 ; Auto-commit of loaddefs files. 2021-06-01 06:29:13 -07:00
Stefan Monnier
3d954dee9c * lisp/gnus/gnus-art.el: Don't sneak dynbound code via quoting
Make sure we don't accidentally quote lambdas by embedding them within
quoted data.

(gnus-visible-headers, gnus-emphasis-alist)
(gnus-mime-display-alternative, gnus-article-describe-bindings):
Unquote lambdas.
2021-06-01 09:14:53 -04:00
João Távora
fb1c5e4816 Add annotation capability to icomplete-vertical-mode
Co-authored-by Daniel Mendler <mail@daniel-mendler.de>

* lisp/icomplete.el (icomplete--affixate): New helper.
(icomplete--render-vertical): Use it. Rework.
(icomplete-completions): Pass md to icomplete--render-vertical.
2021-06-01 10:44:47 +01:00
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