1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00
Commit Graph

140053 Commits

Author SHA1 Message Date
Eli Zaretskii
dd3f2130cf A better fix for extension of overlay string's faces
* src/xdisp.c (face_at_pos): Revert previous change that
rejected the underlying face if it failed the filtering
criteria.
* src/xfaces.c (face_at_string_position): Reset the base face's
attribute used for filtering faces if the attribute is t.
(Bug#38563)
2019-12-13 12:29:05 +02:00
Juri Linkov
9eaad4de02 * lisp/emacs-lisp/edebug.el (edebug-remove-instrumentation): Use 'user-error'. 2019-12-13 01:47:03 +02:00
Juri Linkov
b5781e63cb * lisp/wid-edit.el (widget-field): Add ':extend t' to defface (bug#37774) 2019-12-13 01:43:35 +02:00
Mattias Engdegård
f16766a0eb Use or' instead of union' for charset union in rx
Design change suggested by Stefan Monnier.

* doc/lispref/searching.texi (Rx Constructs):
* etc/NEWS: Document.
* lisp/emacs-lisp/rx.el (rx--translate-or): Detect charset arguments.
(rx--charset-p): New.
(rx--translate-not, rx--charset-intervals, rx--translate-union):
Change from `union' to `or'.
(rx--translate-form, rx--builtin-forms, rx): Remove `union'.
* test/lisp/emacs-lisp/rx-tests.el (rx-union, rx-def-in-union)
(rx-intersection): Rename tests and change `union' to `or' and `|'.
2019-12-12 23:47:25 +01:00
Eli Zaretskii
d7efe98951 ; * src/xdisp.c (face_at_pos): Fix last change. 2019-12-12 20:07:42 +02:00
Michael Albinus
ede63fed1f Optimize prompt search in Tramp
* lisp/net/tramp.el (tramp-search-regexp): New defun.
(tramp-check-for-regexp, tramp-process-sentinel):
* lisp/net/tramp-adb.el (tramp-adb-send-command-and-check)
(tramp-adb-wait-for-output):
* lisp/net/tramp-sh.el (tramp-wait-for-output)
(tramp-send-command-and-check):
* lisp/net/tramp-smb.el (tramp-smb-handle-set-file-acl):
Bind search length.
2019-12-12 15:21:34 +01:00
Juanma Barranquero
54d2fd1178 Avoid spurious warning about maybe-uninitialized variable
* src/xdisp.c (face_at_pos): Initialize base_face_id to 0
to silence the compiler.
2019-12-12 14:42:53 +01:00
Eli Zaretskii
6ee3675dad Fix face extension of overlay strings on buffer text with faces
* src/xdisp.c (face_at_pos): Reject the face returned by
'underlying_face_id' when we are filtering by face attribute,
and that attribute's value fails the filter test.  (Bug#38563)
2019-12-12 13:16:46 +02:00
Robert Pluim
d57bb0c323 Treat passed strings as raw-text when percent-escaping in epg
The strings contained in gpg keys can contain UTF-8 data, but can also
use percent-escapes to encode non-ASCII chars.  When converting those
escapes, use 'raw-text' coding system rather than 'string-to-unibyte',
since the latter signals an error for non-ASCII characters.

* lisp/epg.el (epg--decode-percent-escape): Convert the passed
string to raw-text before treating percent escapes (Bug#38512).
2019-12-12 08:28:25 +01:00
Stefan Monnier
7a498af10a * lisp/emacs-lisp/debug.el (debug-on-entry): Allow undefined functions
Allow placing debug-on-entry on a function not-yet-defined, which
is convenient when the problem you're investigating happens while
the relevant files are loaded.
2019-12-11 20:24:44 -05:00
Stefan Monnier
a642b4d35c * lisp/font-lock.el (font-lock-fontify-region): Widen here (bug#38049)
(font-lock-default-fontify-region): Instead of here.
2019-12-11 20:21:17 -05:00
Stefan Monnier
a8b628107b * lisp/calculator.el (cl-lib): Require at run-time as well.
Needed since we pass the `cl-flet` macro to `eval` in `calculator-funcall`.
2019-12-11 20:18:49 -05:00
Stefan Monnier
47a767c24e * lisp/gnus/message.el (message-expand-name-standard-ui): New option
(message--old-style-completion-functions): New var.
(message-completion-function): Allow functions on
`message-completion-alist` to follow the capf protocol.
(message-completion-alist): Adjust docstring accordingly.
Simplify regexps and make them apply more liberally.
(message-expand-group): Use the capf protocol.
(completion-category-defaults): Use 'substring' completion style by
default for email addresses.
(message--bbdb-query-with-words, message--name-table): New functions.
(message-expand-name): Use them to obey `message-expand-name-standard-ui`.
2019-12-11 20:17:17 -05:00
Stefan Monnier
394c91e4bf * lisp/net/eudc.el (eudc-query-with-words): New function
Extracted from eudc-expand-inline.
(eudc-expand-inline): Use it.
2019-12-11 17:20:02 -05:00
Eli Zaretskii
bad2532f66 Avoid infloop in face merging due to bad face spec
* src/xfaces.c (face_inherited_attr): Don't infloop if
get_lface_attributes fails in the inner loop.  Reported by
Yuri D'Elia <wavexx@thregr.org>.
2019-12-11 19:11:23 +02:00
Paul Eggert
73e51c9846 * src/xterm.c: Remove long-obsolete comments. 2019-12-11 08:53:33 -08:00
Robert Pluim
ea84a95bd8 Check for GUI frame in ns_color_index_to_rgba
* nsterm.m (ns_color_index_to_rgba): Check that we're using a GUI
frame before converting color (Bug#38564).
2019-12-11 16:28:24 +01:00
Michael Albinus
8aaa92a4b6 Don't spam the echo area and the *Messages* buffer in Tramp
* lisp/net/tramp-sh.el (tramp-sh-handle-vc-registered):
When called during `revert-buffer', don't spam the echo area and
the *Messages* buffer.
2019-12-11 16:05:12 +01:00
Paul Eggert
eb7df2a4e3 Improve tv_nsec doc
* doc/lispref/internals.texi (Module Values):
Document tv_nsec more accurately.
2019-12-10 20:41:55 -08:00
Paul Eggert
b0f20651e3 ; Spelling fixes 2019-12-10 20:05:49 -08:00
Paul Eggert
0940296ebe Just use size_t for emacs_limb_t
* src/emacs-module.h.in: Do not include limits.h; no longer needed.
(emacs_limb_t, EMACS_LIMB_MAX): Now size_t and SIZE_MAX.
2019-12-10 13:58:38 -08:00
Mattias Engdegård
ea93326cc0 Add union' and intersection' to rx (bug#37849)
These character set operations, together with `not' for set
complement, improve the compositionality of rx, and reduce duplication
in complicated cases.  Named character classes are not permitted in
set operations.

* lisp/emacs-lisp/rx.el (rx--translate-any): Split into multiple
functions.
(rx--foldl, rx--parse-any, rx--generate-alt, rx--intervals-to-alt)
(rx--complement-intervals, rx--intersect-intervals)
(rx--union-intervals, rx--charset-intervals, rx--charset-union)
(rx--charset-all, rx--charset-intersection, rx--translate-union)
(rx--translate-intersection): New.
(rx--translate-not, rx--translate-form, rx--builtin-forms, rx):
Add `union' and `intersection'.
* test/lisp/emacs-lisp/rx-tests.el (rx-union ,rx-def-in-union)
(rx-intersection, rx-def-in-intersection): New tests.
* doc/lispref/searching.texi (Rx Constructs):
* etc/NEWS:
Document `union' and `intersection'.
2019-12-10 22:37:47 +01:00
Alan Third
9546a2a0d6 Fix XBM files on NS (bug#26133)
Reinstate some of the functionality removed in commit
67a878f78f.

* src/nsimage.m (ns_image_from_XBM): Use new reverseBytes argument.
([EmacsImage initFromXBM:width:height:fg:bg:reverseBytes:]): Add
ability to reverse the contents of each byte for use with XBMs, while
still working with fringe bitmaps.
* src/nsterm.h
([EmacsImage initFromXBM:width:height:fg:bg:reverseBytes:]): Modified
function definition.
* src/nsterm.m (ns_draw_fringe_bitmap): Use new reverseBytes argument.
2019-12-10 20:38:21 +00:00
Alan Third
33a37360de Fix dabbrev-completion (bug#17899)
* lisp/dabbrev.el (dabbrev--check-all-buffers): Add new variable.
(dabbrev-completion): Lexical scoping means we can't use let to
override global variables, so use setq.
(dabbrev--reset-global-variables): Reset new variable.
(dabbrev--make-friend-buffer-list): Use new variable.
* test/lisp/dabbrev-tests.el (dabbrev-completion-test):
(dabbrev-completion-test-with-argument): New tests.
2019-12-10 20:38:21 +00:00
Alan Third
fbf9fea4fd Fix mouse-position on macOS (bug#4892)
* src/nsterm.m (ns_mouse_position): Implement a search for the frame
under the mouse pointer.
2019-12-10 20:38:21 +00:00
Federico Tedin
9042ece787 Simplify call to add-to-history in read_minibuf
* src/minibuf.c (read_minibuf): Avoid restoring the previous buffer,
as this is already done at the end of the function; call
`add-to-history' after that point.
2019-12-10 11:12:23 -05:00
Eli Zaretskii
0f9c016a52 ; * etc/NEWS: Minor copyedits of a recently changed entry. 2019-12-10 17:38:11 +02:00
Paul Eggert
d1a791f8ed Spelling fixes 2019-12-09 18:45:18 -08:00
Paul Eggert
28578f87b5 Prefer static to extern in ebrowse
* lib-src/ebrowse.c (info_where, info_cls, info_member)
(info_position, options, yyival, yytext, yytext_end, yyout)
(yyline, filename, is_ident, is_digit, is_white, f_append)
(f_verbose, f_very_verbose, f_structs, f_regexps)
(f_nested_classes, min_regexp, max_regexp, inbuffer, in)
(inbuffer_size, string_start, class_table, member_table)
(namespace_alias_table, global_symbols, current_namespace)
(all_namespaces, namespace_stack, namespace_stack_size)
(namespace_sp, tk, keyword_table, search_path)
(search_path_tail, scope_buffer, scope_buffer_size)
(scope_buffer_len): Now static.
(options): Now const.
2019-12-09 17:32:07 -08:00
Paul Eggert
eec809e983 * lib-src/etags.c (pot_etags_version): Remove; unused. 2019-12-09 17:32:07 -08:00
Paul Eggert
daaa9da0c4 * lib-src/etags.c (Forth_suffixes): Now static. 2019-12-09 17:32:07 -08:00
Dmitry Gutov
ac1b6e97b6 Rename faces used in faces-tests.el
* test/data/themes/faces-test-light-theme.el:
* test/data/themes/faces-test-dark-theme.el: Update accordingly.

* test/lisp/faces-tests.el (faces--test-extend-with-themes):
Don't use the diff-mode faces.  Rename the definitions.
2019-12-10 02:16:44 +02:00
Dmitry Gutov
58fb4c3e68 Make ':extend' inherited from default spec unless overridden
* lisp/faces.el (face-spec-recalc): Handle the :extend attribute
specially and always inherit it from the default spec unless
overwritten in a theme (bug#37774).

* test/lisp/faces-tests.el (faces--test-data-dir): New variable.
(faces--test-extend-with-themes): Use test themes instead of ones
from etc/themes.  Update expected values.

* test/data/themes/faces-test-dark-theme.el: New file.

* test/data/themes/faces-test-light-theme.el: New file.

* doc/lispref/display.texi (Face Attributes):
Update the description of ':extend'.

* etc/NEWS: Update the entry for ':extend'.

* etc/themes/adwaita-theme.el:
* etc/themes/deeper-blue-theme.el:
* etc/themes/dichromacy-theme.el:
* etc/themes/leuven-theme.el:
* etc/themes/light-blue-theme.el:
* etc/themes/manoj-dark-theme.el:
* etc/themes/misterioso-theme.el:
* etc/themes/tango-dark-theme.el:
* etc/themes/tango-theme.el:
* etc/themes/tsdh-dark-theme.el:
* etc/themes/tsdh-light-theme.el:
* etc/themes/wheatgrass-theme.el:
* etc/themes/wombat-theme.el: Remove the now-redundant ':extend'
attribute in all the themes.
2019-12-10 02:16:44 +02:00
Juri Linkov
d8d537e173 * lisp/emacs-lisp/map-ynp.el (read-answer): Use [remap self-insert-command]
This reverts the last change that replaced [remap self-insert-command]
with [t].  The user should have freedom of using any command
in the minibuffer.  (bug#32738)
2019-12-10 01:53:16 +02:00
Paul Eggert
5063e38921 Improve module bignum doc
* doc/lispref/internals.texi (Module Values): Tighten up
wording and code, and make the long example self-contained.
Fit things in margins.
2019-12-09 15:41:02 -08:00
Dmitry Gutov
bb8f46d55b project-find-regexp: Default to symbol at point
* lisp/progmodes/project.el (project--read-regexp):
Don't rely on the Xref backend to provide the default value.
2019-12-09 16:27:28 +02:00
Eli Zaretskii
aed9584a0e Add more tests for face :extend attribute
* test/lisp/faces-tests.el (faces--test-extend-with-themes):
New set of tests for verifying the :extend attribute across
theme loading and unloading, and also via face inheritance.
(Bug#37774)
2019-12-09 14:46:43 +02:00
Juri Linkov
51176ee81e * lisp/emacs-lisp/map-ynp.el (read-answer): Allow more SHORT-ANSWER types.
Treat SHORT-ANSWER as a character is characterp returns non-nil.
Otherwise, use key-description to print it.
Use catch-all [t] in keymap instead of [remap self-insert-command].
(bug#32738)
2019-12-09 01:27:29 +02:00
Juri Linkov
7c2c24a1aa * doc/emacs/mini.texi (Minibuffer Edit): Add minibuffer-depth-indicate-mode.
* doc/emacs/search.texi (Regexp Backslash): Change xref from
"(elisp) Syntax Tables" to "(elisp) Syntax Class Table".

* doc/lispref/display.texi (Other Display Specs): Change xref from
"Images" to "Image Descriptors".

(bug#38519)
2019-12-09 00:45:50 +02:00
Juri Linkov
252e5a8852 * lisp/simple.el (shell-command-on-region): Use set-buffer-major-mode.
This enables globalized minor modes explicitly after get-buffer-create
creates "*Shell Command Output*" buffer (bug#38111).
2019-12-09 00:27:34 +02:00
Juri Linkov
9ea3137bc8 Move recenter/scroll keybindings from minibuffer-local-map to read-char map
* lisp/minibuffer.el (minibuffer-local-map): Move remap of
recenter/scroll keybindings to read-char-from-minibuffer-map.

* lisp/subr.el (read-char-from-minibuffer-map): Move remap of
recenter/scroll keybindings here from minibuffer-local-map.
(bug#38502)
2019-12-09 00:19:43 +02:00
Juri Linkov
fe7ae74c0b * lisp/tab-line.el (tab-line-format): Use composite cache key (bug#38522) 2019-12-09 00:08:53 +02:00
Eric Abrahamsen
37d801a19a Continued fixes to gnus registry loading
* lisp/gnus/gnus-registry.el (gnus-registry-db): Do not initialize
this variable to an empty database, that should only be done for new
databases.
(gnus-registry-load): Remove "force" argument, don't check if the
database is already loaded, as we're only going to load it once.
(gnus-registry-initialize): Either load the db directly, or set up a
hook to do it later.
(gnus-registry-install-hooks): Don't load on
gnus-read-newsrc-el-hook.
2019-12-08 12:25:33 -08:00
Eli Zaretskii
f93a604ff1 ; * etc/NEWS: Fix a recently added entry. 2019-12-08 20:11:48 +02:00
Juri Linkov
7e387c9e52 * lisp/man.el (Man-width-max): New defcustom (bug#32536, bug#9385)
(Man-columns): New buffer-local variable.
(Man-columns): New function.
(Man-start-calling): Call Man-columns and set buffer-local Man-columns.
(Man--window-state-change-timer): New internal variable.
(Man--window-state-change): New internal function.
(Man-fit-to-window): New function.
(Man-mode): Add Man--window-state-change to local hook
window-state-change-functions.

* lisp/image-mode.el (image-fit-to-window): Add window arg to
window-buffer call.
2019-12-08 00:36:58 +02:00
Robert Cochran
97f24412e7 Add hooks for after tab open, before close, and to prevent closing
* lisp/tab-bar.el (tab-bar-tab-post-open-functions,
tab-bar-tab-prevent-close-functions, tab-bar-tab-pre-close-functions):
New defcustoms
(tab-bar-new-tab-to, tab-bar-close-tab): Use new defcustoms
2019-12-08 00:23:29 +02:00
Jackson Ray Hamilton
8e1c553260
Ignore comments and strings when matching JSX
* lisp/progmodes/js.el (js-jsx--matching-close-tag-pos): Ignore
comments and strings.
* test/manual/indent/jsx-comment-string.jsx: New test.
2019-12-07 13:18:00 -08:00
Jackson Ray Hamilton
c299c9b6fb
; * lisp/progmodes/js.el: Fix typo 2019-12-07 13:18:00 -08:00
Jackson Ray Hamilton
3d21ba374f
; * lisp/progmodes/js.el: Remove unnecessary concat 2019-12-07 13:18:00 -08:00
Alan Mackenzie
68d4a14fd4 CC Mode: Allow most functions on post-self-insert-hook to be called
This contrasts with the previous state where no such functions got called.
This fixes bug #38406.

* lisp/progmodes/cc-cmds.el (c--unsafe-post-self-insert-hook-functions): New
variable.
(c--call-post-self-insert-hook-more-safely-1): New function.
(c--call-post-self-insert-hook-more-safely): New macro.
(c-electric-pound, c-electric-brace, c-electric-slash, c-electric-star)
(c-electric-semi&comma, c-electric-colon, c-electric-lt-gt, c-electric-paren):
Invoke c--call-post-self-insert-hook-more-safely (which calls most of the hook
post-self-insert-hook) at the end of each of the commands.
2019-12-07 18:55:19 +00:00