]> git.eshelyaron.com Git - emacs.git/log
emacs.git
5 years agoImprove Tramp's file-name-completion
Michael Albinus [Tue, 17 Dec 2019 09:38:42 +0000 (10:38 +0100)]
Improve Tramp's file-name-completion

* lisp/net/tramp.el (tramp-handle-file-name-completion):
Filter out "./" and "../", if there's only one other result.

5 years agoAdjust cursor column when auto-scrolling during rectangle selection
Mattias Engdegård [Mon, 16 Dec 2019 21:42:16 +0000 (22:42 +0100)]
Adjust cursor column when auto-scrolling during rectangle selection

* lisp/mouse.el (mouse-drag-region-rectangle):
Move cursor to the correct column during auto-scrolling both when
crutches are used and not (bug#38641).  Reported by Konrad Podczeck.

5 years agoMake ls-files-unknown only return proper files, not directories
Andrii Kolomoiets [Mon, 16 Dec 2019 23:49:34 +0000 (01:49 +0200)]
Make ls-files-unknown only return proper files, not directories

* lisp/vc/vc-git.el (vc-git-dir-status-goto-stage):
Make ls-files-unknown only return proper files, not directories
(bug#38615).

5 years agovc-git-after-dir-status-stage: Avoid erroneous up-to-date status
Dmitry Gutov [Mon, 16 Dec 2019 21:55:11 +0000 (23:55 +0200)]
vc-git-after-dir-status-stage: Avoid erroneous up-to-date status

* lisp/vc/vc-git.el (vc-git-after-dir-status-stage):
Don't set `up-to-date' status if the previous stage (`diff-index')
has assigned some other status to the file (bug#38615).

5 years agoFix face merging for display strings broken by a recent commit
Eli Zaretskii [Mon, 16 Dec 2019 15:43:30 +0000 (17:43 +0200)]
Fix face merging for display strings broken by a recent commit

* src/xfaces.c (face_at_string_position): Revert the last
change, as it cannot possibly solve bug#38563.
* src/xdisp.c (face_at_pos): Fix a typo made during last
change here, which broke face merging for display strings.
(Bug#38633)

5 years ago* lisp/isearch.el (isearch-xterm-paste): Use code like in 'xterm-paste'.
Juri Linkov [Mon, 16 Dec 2019 00:18:00 +0000 (02:18 +0200)]
* lisp/isearch.el (isearch-xterm-paste): Use code like in 'xterm-paste'.

Add arg 'event' and use it to get pasted text.
This allows pasting text on terminals to the
search string (bug#18727, bug#36950).

5 years agoRevert aa89c84e00d8dc85100e6fedab7631c415e6364d (bug#38457)
Juri Linkov [Sun, 15 Dec 2019 23:58:14 +0000 (01:58 +0200)]
Revert aa89c84e00d8dc85100e6fedab7631c415e6364d (bug#38457)

* src/editfns.c (Fmessage): Don't use minibuffer-message.
(Fmessage_in_echo_area): Remove function message-in-echo-area.
(syms_of_editfns): Remove variable message-in-echo-area.

* lisp/isearch.el (isearch--momentary-message): Remove message-in-echo-area.
* lisp/minibuffer.el (minibuffer-message): Don't record message
in the *Messages* buffer.
(minibuffer-completion-help): Remove message-in-echo-area.

* lisp/subr.el (do-after-load-evaluation): Remove discard-input (bug#38560)

5 years ago* lisp/tab-line.el (tab-line-auto-hscroll): Improve.
Juri Linkov [Sun, 15 Dec 2019 23:14:02 +0000 (01:14 +0200)]
* lisp/tab-line.el (tab-line-auto-hscroll): Improve.

Better handling of tabs scrolled to the left.
Don't scroll tabs that are already visible.

Remove setq of buffer-undo-list because undo is disabled
anyway in internal buffers with name " *temp*".

5 years ago* lisp/tab-bar.el (tab-bar-handle-mouse): Handle close button.
Juri Linkov [Sun, 15 Dec 2019 23:08:45 +0000 (01:08 +0200)]
* lisp/tab-bar.el (tab-bar-handle-mouse): Handle close button.

5 years ago* lisp/tab-bar.el (tab-bar-select-tab): Message about selected tab (bug#38624)
Juri Linkov [Sun, 15 Dec 2019 23:03:55 +0000 (01:03 +0200)]
* lisp/tab-bar.el (tab-bar-select-tab): Message about selected tab (bug#38624)

5 years ago* lisp/tab-bar.el (tab-bar-close-other-tabs): Use tab close customs
Robert Cochran [Wed, 11 Dec 2019 18:29:00 +0000 (10:29 -0800)]
* lisp/tab-bar.el (tab-bar-close-other-tabs): Use tab close customs

5 years agoDocument variables that affect tabs in function docstrings
Robert Cochran [Wed, 11 Dec 2019 18:04:06 +0000 (10:04 -0800)]
Document variables that affect tabs in function docstrings

* lisp/tab-bar.el (tab-bar-new-tab-to): Mention
tab-bar-post-open-functions in docstring.
(tab-bar-close-tab): Mention tab-bar-prevent-tab-functions,
tab-bar-tab-pre-close-functions, and tab-bar-close-last-tab-choice.

5 years agoNew command 'diff-buffers'
Phil Sainty [Sat, 14 Dec 2019 07:49:41 +0000 (20:49 +1300)]
New command 'diff-buffers'

* lisp/vc/diff.el (diff-buffers): New command.
(diff, diff-no-select, diff-file-local-copy): Improve docstrings.
* doc/emacs/files.texi:
* etc/NEWS: Document new command, and the previously-undocumented
ability for 'diff' to compare buffers.

5 years agoAdjust intptr_t advice
Paul Eggert [Sat, 14 Dec 2019 22:22:03 +0000 (14:22 -0800)]
Adjust intptr_t advice

* doc/lispref/internals.texi (C Integer Types): Say to prefer
uintptr_t when pointer arithmetic might overflow intptr_t.

5 years agoRemove nothing from union output_data
Paul Eggert [Sat, 14 Dec 2019 22:13:10 +0000 (14:13 -0800)]
Remove nothing from union output_data

* src/frame.h (union output_data): Remove ‘nothing’ member.
It has had no effect for quite some time.
All uses removed.

5 years agoUpdate documentation of pure-space overflow
Eli Zaretskii [Sat, 14 Dec 2019 18:02:11 +0000 (20:02 +0200)]
Update documentation of pure-space overflow

* doc/lispref/internals.texi (Garbage Collection)
(Pure Storage):
* src/alloc.c (Fgarbage_collect): Update the documentation of
pure-space overflow for when pdumper is used.  (Bug#38492)

5 years ago* lisp/minibuffer.el (completion-pcm--find-all-completions): Simplify a bit
Stefan Monnier [Sat, 14 Dec 2019 17:40:29 +0000 (12:40 -0500)]
* lisp/minibuffer.el (completion-pcm--find-all-completions): Simplify a bit

5 years ago* lisp/net/tramp.el (tramp-initial-file-name-regexp): Make it more precise.
Michael Albinus [Sat, 14 Dec 2019 13:20:00 +0000 (14:20 +0100)]
* lisp/net/tramp.el (tramp-initial-file-name-regexp): Make it more precise.

5 years agoFix cross-references in ELisp manual
Eli Zaretskii [Sat, 14 Dec 2019 11:56:29 +0000 (13:56 +0200)]
Fix cross-references in ELisp manual

* doc/lispref/commands.texi (Misc Events, Special Events): Fix
cross-references.  (Bug#38520)

5 years agoDon't warn about pure-space overflow
Eli Zaretskii [Sat, 14 Dec 2019 11:39:26 +0000 (13:39 +0200)]
Don't warn about pure-space overflow

* lisp/startup.el (command-line-1): Don't warn about
pure-space overflow if we were dumped with pdumper.
(Bug#38492)

5 years agoFix typo that broke GNU/Linux unexec build
Paul Eggert [Sat, 14 Dec 2019 01:06:52 +0000 (17:06 -0800)]
Fix typo that broke GNU/Linux unexec build

* src/emacs.c (Fdump_emacs): Remove stray closing brace that
breaks the build when configured with --with-dumping=unexec on
GNU/Linux.  (Apparently everybody is using pdumper now.)
I introduced the bug in 2019-07-09T00:50:39Z!eggert@cs.ucla.edu.

5 years agoxfaces.c: Silence spurious maybe-uninitialized compiler warning
Juanma Barranquero [Fri, 13 Dec 2019 17:52:49 +0000 (18:52 +0100)]
xfaces.c: Silence spurious maybe-uninitialized compiler warning

* src/xfaces.c (face_inherited_attr): Initialize 'ok' to false.

5 years agoDisable undo in the process buffers of a JSONRPC connection
João Távora [Wed, 11 Dec 2019 21:26:35 +0000 (22:26 +0100)]
Disable undo in the process buffers of a JSONRPC connection

* lisp/jsonrpc.el (initialize-instance jsonrpc-process-connection):
Use buffer-disable-undo in stdout and stderr buffers.

* lisp/jsonrpc.el (Version): Bump to 1.0.9

5 years ago* lisp/net/tramp.el (tramp-unload-tramp): Autoload function body.
Michael Albinus [Fri, 13 Dec 2019 15:36:57 +0000 (16:36 +0100)]
* lisp/net/tramp.el (tramp-unload-tramp): Autoload function body.

5 years agopython-shell-completion-at-point: respect simple-operator (Bug#37808)
Andrii Kolomoiets [Fri, 18 Oct 2019 13:04:32 +0000 (16:04 +0300)]
python-shell-completion-at-point: respect simple-operator (Bug#37808)

* lisp/progmodes/python.el (python-shell-completion-at-point): Also
stop on simple-operator while parsing input.

5 years agoAllow characters and single-char strings in rx charsets
Mattias Engdegård [Fri, 13 Dec 2019 12:10:58 +0000 (13:10 +0100)]
Allow characters and single-char strings in rx charsets

The `not' and `intersection' forms, and `or' inside these forms,
now accept characters and single-character strings as arguments.
Previously, they had to be wrapped in `any' forms.
This does not add expressive power but is a convenience and is easily
understood.

* doc/lispref/searching.texi (Rx Constructs): Amend the documentation.
* etc/NEWS: Announce the change.
* lisp/emacs-lisp/rx.el (rx--charset-p, rx--translate-not)
(rx--charset-intervals, rx): Accept characters and 1-char strings in
more places.
* test/lisp/emacs-lisp/rx-tests.el (rx-not, rx-charset-or)
(rx-def-in-charset-or, rx-intersection): Test the change.

5 years ago; * src/emacs-module.h.in: Sort includes alphabetically.
Philipp Stephani [Fri, 13 Dec 2019 12:21:36 +0000 (13:21 +0100)]
; * src/emacs-module.h.in: Sort includes alphabetically.

5 years agoAdd prefix to help.el uni-confusable* vars
Noam Postavsky [Fri, 13 Dec 2019 11:36:02 +0000 (06:36 -0500)]
Add prefix to help.el uni-confusable* vars

* lisp/help.el (help-uni-confusables, help-uni-confusables-regexp):
Rename from uni-confusable and uni-confusables-regexp, respectively.
(help-uni-confusable-suggestions): Use ngettext.  Use new variable
name.
* lisp/emacs-lisp/lisp-mode.el (lisp--match-confusable-symbol-character):
Use new variable name.

5 years agoA better fix for extension of overlay string's faces
Eli Zaretskii [Fri, 13 Dec 2019 10:29:05 +0000 (12:29 +0200)]
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)

5 years ago* lisp/emacs-lisp/edebug.el (edebug-remove-instrumentation): Use 'user-error'.
Juri Linkov [Thu, 12 Dec 2019 23:47:03 +0000 (01:47 +0200)]
* lisp/emacs-lisp/edebug.el (edebug-remove-instrumentation): Use 'user-error'.

5 years ago* lisp/wid-edit.el (widget-field): Add ':extend t' to defface (bug#37774)
Juri Linkov [Thu, 12 Dec 2019 23:43:35 +0000 (01:43 +0200)]
* lisp/wid-edit.el (widget-field): Add ':extend t' to defface (bug#37774)

5 years agoUse `or' instead of `union' for charset union in rx
Mattias Engdegård [Thu, 12 Dec 2019 22:04:00 +0000 (23:04 +0100)]
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 `|'.

5 years ago; * src/xdisp.c (face_at_pos): Fix last change.
Eli Zaretskii [Thu, 12 Dec 2019 18:07:42 +0000 (20:07 +0200)]
; * src/xdisp.c (face_at_pos): Fix last change.

5 years agoOptimize prompt search in Tramp
Michael Albinus [Thu, 12 Dec 2019 14:21:34 +0000 (15:21 +0100)]
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.

5 years agoAvoid spurious warning about maybe-uninitialized variable
Juanma Barranquero [Thu, 12 Dec 2019 13:42:36 +0000 (14:42 +0100)]
Avoid spurious warning about maybe-uninitialized variable

* src/xdisp.c (face_at_pos): Initialize base_face_id to 0
to silence the compiler.

5 years agoFix face extension of overlay strings on buffer text with faces
Eli Zaretskii [Thu, 12 Dec 2019 11:16:46 +0000 (13:16 +0200)]
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)

5 years agoTreat passed strings as raw-text when percent-escaping in epg
Robert Pluim [Mon, 9 Dec 2019 17:41:59 +0000 (18:41 +0100)]
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).

5 years ago* lisp/emacs-lisp/debug.el (debug-on-entry): Allow undefined functions
Stefan Monnier [Thu, 12 Dec 2019 01:24:44 +0000 (20:24 -0500)]
* 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.

5 years ago* lisp/font-lock.el (font-lock-fontify-region): Widen here (bug#38049)
Stefan Monnier [Thu, 12 Dec 2019 01:21:17 +0000 (20:21 -0500)]
* lisp/font-lock.el (font-lock-fontify-region): Widen here (bug#38049)

(font-lock-default-fontify-region): Instead of here.

5 years ago* lisp/calculator.el (cl-lib): Require at run-time as well.
Stefan Monnier [Thu, 12 Dec 2019 01:18:49 +0000 (20:18 -0500)]
* lisp/calculator.el (cl-lib): Require at run-time as well.

Needed since we pass the `cl-flet` macro to `eval` in `calculator-funcall`.

5 years ago* lisp/gnus/message.el (message-expand-name-standard-ui): New option
Stefan Monnier [Thu, 12 Dec 2019 01:17:17 +0000 (20:17 -0500)]
* 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`.

5 years ago* lisp/net/eudc.el (eudc-query-with-words): New function
Stefan Monnier [Wed, 11 Dec 2019 22:20:02 +0000 (17:20 -0500)]
* lisp/net/eudc.el (eudc-query-with-words): New function

Extracted from eudc-expand-inline.
(eudc-expand-inline): Use it.

5 years agoAvoid infloop in face merging due to bad face spec
Eli Zaretskii [Wed, 11 Dec 2019 17:11:23 +0000 (19:11 +0200)]
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>.

5 years ago* src/xterm.c: Remove long-obsolete comments.
Paul Eggert [Wed, 11 Dec 2019 16:53:14 +0000 (08:53 -0800)]
* src/xterm.c: Remove long-obsolete comments.

5 years agoCheck for GUI frame in ns_color_index_to_rgba
Robert Pluim [Wed, 11 Dec 2019 10:21:22 +0000 (11:21 +0100)]
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).

5 years agoDon't spam the echo area and the *Messages* buffer in Tramp
Michael Albinus [Wed, 11 Dec 2019 15:05:12 +0000 (16:05 +0100)]
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.

5 years agoImprove tv_nsec doc
Paul Eggert [Wed, 11 Dec 2019 04:41:28 +0000 (20:41 -0800)]
Improve tv_nsec doc

* doc/lispref/internals.texi (Module Values):
Document tv_nsec more accurately.

5 years ago; Spelling fixes
Paul Eggert [Wed, 11 Dec 2019 04:04:36 +0000 (20:04 -0800)]
; Spelling fixes

5 years agoJust use size_t for emacs_limb_t
Paul Eggert [Tue, 10 Dec 2019 21:54:20 +0000 (13:54 -0800)]
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.

5 years agoAdd `union' and `intersection' to rx (bug#37849)
Mattias Engdegård [Fri, 6 Dec 2019 21:23:57 +0000 (22:23 +0100)]
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'.

5 years agoFix XBM files on NS (bug#26133)
Alan Third [Fri, 6 Dec 2019 16:49:25 +0000 (16:49 +0000)]
Fix XBM files on NS (bug#26133)

Reinstate some of the functionality removed in commit
67a878f78f879ce534232408c34dd11f42dd802b.

* 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.

5 years agoFix dabbrev-completion (bug#17899)
Alan Third [Thu, 5 Dec 2019 13:14:00 +0000 (13:14 +0000)]
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.

5 years agoFix mouse-position on macOS (bug#4892)
Alan Third [Wed, 4 Dec 2019 12:38:57 +0000 (12:38 +0000)]
Fix mouse-position on macOS (bug#4892)

* src/nsterm.m (ns_mouse_position): Implement a search for the frame
under the mouse pointer.

5 years agoSimplify call to add-to-history in read_minibuf
Federico Tedin [Fri, 6 Dec 2019 00:23:25 +0000 (01:23 +0100)]
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.

5 years ago; * etc/NEWS: Minor copyedits of a recently changed entry.
Eli Zaretskii [Tue, 10 Dec 2019 15:38:11 +0000 (17:38 +0200)]
; * etc/NEWS: Minor copyedits of a recently changed entry.

5 years agoSpelling fixes
Paul Eggert [Tue, 10 Dec 2019 02:44:35 +0000 (18:44 -0800)]
Spelling fixes

5 years agoPrefer static to extern in ebrowse
Paul Eggert [Tue, 10 Dec 2019 01:30:42 +0000 (17:30 -0800)]
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.

5 years ago* lib-src/etags.c (pot_etags_version): Remove; unused.
Paul Eggert [Tue, 10 Dec 2019 01:12:49 +0000 (17:12 -0800)]
* lib-src/etags.c (pot_etags_version): Remove; unused.

5 years ago* lib-src/etags.c (Forth_suffixes): Now static.
Paul Eggert [Tue, 10 Dec 2019 01:09:39 +0000 (17:09 -0800)]
* lib-src/etags.c (Forth_suffixes): Now static.

5 years agoRename faces used in faces-tests.el
Dmitry Gutov [Tue, 10 Dec 2019 00:15:55 +0000 (02:15 +0200)]
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.

5 years agoMake ':extend' inherited from default spec unless overridden
Dmitry Gutov [Tue, 10 Dec 2019 00:11:15 +0000 (02:11 +0200)]
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.

5 years ago* lisp/emacs-lisp/map-ynp.el (read-answer): Use [remap self-insert-command]
Juri Linkov [Mon, 9 Dec 2019 23:53:16 +0000 (01:53 +0200)]
* 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)

5 years agoImprove module bignum doc
Paul Eggert [Mon, 9 Dec 2019 23:39:28 +0000 (15:39 -0800)]
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.

5 years agoproject-find-regexp: Default to symbol at point
Dmitry Gutov [Mon, 9 Dec 2019 14:27:28 +0000 (16:27 +0200)]
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.

5 years agoAdd more tests for face :extend attribute
Eli Zaretskii [Mon, 9 Dec 2019 12:46:43 +0000 (14:46 +0200)]
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)

5 years ago* lisp/emacs-lisp/map-ynp.el (read-answer): Allow more SHORT-ANSWER types.
Juri Linkov [Sun, 8 Dec 2019 23:27:29 +0000 (01:27 +0200)]
* 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)

5 years ago* doc/emacs/mini.texi (Minibuffer Edit): Add minibuffer-depth-indicate-mode.
Juri Linkov [Sun, 8 Dec 2019 22:45:50 +0000 (00:45 +0200)]
* 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)

5 years ago* lisp/simple.el (shell-command-on-region): Use set-buffer-major-mode.
Juri Linkov [Sun, 8 Dec 2019 22:27:34 +0000 (00:27 +0200)]
* 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).

5 years agoMove recenter/scroll keybindings from minibuffer-local-map to read-char map
Juri Linkov [Sun, 8 Dec 2019 22:19:43 +0000 (00:19 +0200)]
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)

5 years ago* lisp/tab-line.el (tab-line-format): Use composite cache key (bug#38522)
Juri Linkov [Sun, 8 Dec 2019 22:08:53 +0000 (00:08 +0200)]
* lisp/tab-line.el (tab-line-format): Use composite cache key (bug#38522)

5 years agoContinued fixes to gnus registry loading
Eric Abrahamsen [Tue, 3 Dec 2019 09:12:44 +0000 (09:12 +0000)]
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.

5 years ago; * etc/NEWS: Fix a recently added entry.
Eli Zaretskii [Sun, 8 Dec 2019 18:11:48 +0000 (20:11 +0200)]
; * etc/NEWS: Fix a recently added entry.

5 years ago* lisp/man.el (Man-width-max): New defcustom (bug#32536, bug#9385)
Juri Linkov [Sat, 7 Dec 2019 22:36:58 +0000 (00:36 +0200)]
* 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.

5 years agoAdd hooks for after tab open, before close, and to prevent closing
Robert Cochran [Fri, 8 Nov 2019 19:29:43 +0000 (11:29 -0800)]
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

5 years agoIgnore comments and strings when matching JSX
Jackson Ray Hamilton [Sat, 7 Dec 2019 21:10:45 +0000 (13:10 -0800)]
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.

5 years ago; * lisp/progmodes/js.el: Fix typo
Jackson Ray Hamilton [Sat, 7 Dec 2019 20:27:51 +0000 (12:27 -0800)]
; * lisp/progmodes/js.el: Fix typo

5 years ago; * lisp/progmodes/js.el: Remove unnecessary concat
Jackson Ray Hamilton [Sat, 7 Dec 2019 19:12:49 +0000 (11:12 -0800)]
; * lisp/progmodes/js.el: Remove unnecessary concat

5 years agoCC Mode: Allow most functions on post-self-insert-hook to be called
Alan Mackenzie [Sat, 7 Dec 2019 18:55:19 +0000 (18:55 +0000)]
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.

5 years agoAdd unload code to tramp-integration.el
Michael Albinus [Sat, 7 Dec 2019 12:40:04 +0000 (13:40 +0100)]
Add unload code to tramp-integration.el

* lisp/net/tramp-integration.el (info-lookup->mode-cache)
(info-lookup->topic-cache, info-lookup-alist): Declare.
(ido, ivy, info-look): Adapt `tramp-integration-unload-hook'.

5 years agoCorrections in semantic.texi
Eli Zaretskii [Sat, 7 Dec 2019 10:11:36 +0000 (12:11 +0200)]
Corrections in semantic.texi

* doc/misc/semantic.texi (Parser code, Tag handling)
(Semanticdb Internals, Analyzer Internals, Tools): Fix file
names according to what was actually imported from the
original CEDET.  (Bug#38451)

5 years agoFix documentation of '-position' server command
Eli Zaretskii [Sat, 7 Dec 2019 09:50:14 +0000 (11:50 +0200)]
Fix documentation of '-position' server command

* lisp/server.el (server-process-filter): Fix the description
of "-position" command to match the reality.  (Bug#38443)

5 years agoEnsure buffer is alive in python-pdbtrack-unset-tracked-buffer
Andrii Kolomoiets [Thu, 28 Nov 2019 13:54:41 +0000 (15:54 +0200)]
Ensure buffer is alive in python-pdbtrack-unset-tracked-buffer

* lisp/progmodes/python.el (python-pdbtrack-unset-tracked-buffer):
Check if buffer `python-pdbtrack-tracked-buffer' is alive.
(Bug#38413)

5 years agoFix fallout from fixing bug#37782
Eli Zaretskii [Sat, 7 Dec 2019 09:28:05 +0000 (11:28 +0200)]
Fix fallout from fixing bug#37782

* src/keyboard.c (read_key_sequence): Modify the fix for
bug#37782 so that it applies only to keyboard keys, not to
other events, such as a new buffer.  (Bug#38132)

5 years agoMinor fix in the ELisp manual
Eli Zaretskii [Sat, 7 Dec 2019 08:31:34 +0000 (10:31 +0200)]
Minor fix in the ELisp manual

* doc/lispref/files.texi (Saving Buffers): Remove the
reference to the obsolete Fast Lock mode.  (Bug#37956)

5 years agoRemove duplicate macros from ses.el
Eli Zaretskii [Sat, 7 Dec 2019 07:27:24 +0000 (09:27 +0200)]
Remove duplicate macros from ses.el

* lisp/ses.el (1value, noreturn): Macros deleted, as we
nowadays have them in subr.el.  (Bug#38514)

5 years agoTest format-time-string padding
Paul Eggert [Fri, 6 Dec 2019 23:36:48 +0000 (15:36 -0800)]
Test format-time-string padding

Adapted from tests written by Stephen Gildea.
* test/src/timefns-tests.el:
(format-time-string-padding-minimal-deletes-unneeded-zeros)
(format-time-string-padding-minimal-retains-needed-zeros)
(format-time-string-padding-spaces)
(format-time-string-padding-zeros-adds-on-insignificant-side):
New tests.

5 years agoUpdate from Gnulib
Paul Eggert [Fri, 6 Dec 2019 23:16:15 +0000 (15:16 -0800)]
Update from Gnulib

This incorporates:
2019-12-06 nstrftime: better width support for %N, %z
2019-12-03 Avoid hassles caused by [[noreturn]] in C++
2019-12-02 Fix mistakes in --enable-threads=isoc fixes from 2019-12-01
* admin/merge-gnulib (AVOIDED_MODULES): Avoid pthread-h.
* lib/_Noreturn.h, lib/nstrftime.c, m4/gnulib-common.m4:
* m4/timer_time.m4:
Copy from Gnulib.
* lib/gnulib.mk.in: Regenerate.

5 years agoConfigure info-look.el to recognize Tramp symbols
Michael Albinus [Fri, 6 Dec 2019 18:28:01 +0000 (19:28 +0100)]
Configure info-look.el to recognize Tramp symbols

* lisp/net/tramp-integration.el (info-lookup->cache)
(info-lookup->mode-value, info-lookup->other-modes)
(info-lookup->topic-value, info-lookup-maybe-add-help)
(info-lookup-cache): Declare.
(info-look): Configure info-look.el to recognize Tramp symbols.

5 years agoClarify documentation of functions that use the default face
Eli Zaretskii [Fri, 6 Dec 2019 15:42:19 +0000 (17:42 +0200)]
Clarify documentation of functions that use the default face

* lisp/simple.el (default-font-height, default-font-width)
(default-line-height): Say in the doc strings that the default
face these functions use is for the currently selected frame.

* doc/lispref/display.texi (Attribute Functions)
(Low-Level Font): Document more clearly the dependence of the
results of 'face-font', 'default-font-width', and
'default-font-height' on the frame's definition of the default
face.

5 years agoFix set-marker when the position is larger than the largest buffer
Eli Zaretskii [Fri, 6 Dec 2019 13:29:20 +0000 (15:29 +0200)]
Fix set-marker when the position is larger than the largest buffer

* src/marker.c (set_marker_internal): Handle the case where
POSITION is beyond PTRDIFF_MAX, which can happen if Emacs was
built --with-wide-int.  Bug uncovered by the recently added
overlay tests.

5 years agoMerge branch 'completion-first-difference_face'
Thierry Volpiatto [Fri, 6 Dec 2019 07:01:26 +0000 (08:01 +0100)]
Merge branch 'completion-first-difference_face'

5 years agoFix setting completions* faces in
Thierry Volpiatto [Fri, 6 Dec 2019 06:22:57 +0000 (07:22 +0100)]
Fix setting completions* faces in

`completion-pcm--hilit-commonality` so that these faces doesn't
override possible already existing faces in other UIs.

* lisp/minibuffer.el (completion-pcm--hilit-commonality): Use
`add-face-text-property` instead of `put-text-property`.

5 years ago* test/src/buffer-tests.el: Add loads of overlay tests
Andreas Politz [Fri, 6 Dec 2019 04:10:32 +0000 (23:10 -0500)]
* test/src/buffer-tests.el: Add loads of overlay tests

Taken from the `feature/noverlay` branch.
Suggested by Vladimir Kazanov <vekazanov@gmail.com>.

5 years ago2019-12-05 regexp lint fixes
Paul Eggert [Fri, 6 Dec 2019 03:31:00 +0000 (19:31 -0800)]
2019-12-05 regexp lint fixes

* lisp/org/org-agenda.el (org-agenda-filter):
Fix unescaped literal ‘+’ in regexp.  Reported by Mattias Engdegård in:
https://lists.gnu.org/r/emacs-devel/2019-12/msg00215.html
* lisp/org/org.el (org-clone-subtree-with-time-shift):
Fix a regexp typo that mishandled strings like ‘\1d’,
reported by the same emaikl.
* lisp/progmodes/verilog-mode.el (verilog-inject-inst):
Omit unnecessary ‘?’ in regexp.  Reported by Mattias Engdegård in:
https://lists.gnu.org/r/emacs-devel/2019-12/msg00217.html

5 years agoAnother fix for :extend when :inherit is used
Eli Zaretskii [Thu, 5 Dec 2019 17:58:02 +0000 (19:58 +0200)]
Another fix for :extend when :inherit is used

* src/xfaces.c (face_inherited_attr): Support also values of
:inherit which are lists.  (Bug#37774)

5 years agoMinor copyedits of 'jit-lock-antiblink-grace's docs
Eli Zaretskii [Thu, 5 Dec 2019 15:43:06 +0000 (17:43 +0200)]
Minor copyedits of 'jit-lock-antiblink-grace's docs

* lisp/jit-lock.el (jit-lock-antiblink-grace):
* etc/NEWS (value): Reword the NEWS entry and the doc string.

5 years agoFix recent modifications in emacs-module-tests
Eli Zaretskii [Thu, 5 Dec 2019 14:38:17 +0000 (16:38 +0200)]
Fix recent modifications in emacs-module-tests

* test/data/emacs-module/mod-test.c (extract_big_integer): Fix
calculation of size of 'magnitude' when 'emacs_limb_t' is wider
than 'unsigned long'.

* test/src/emacs-module-tests.el
(module--test-assertions--load-non-live-object)
(module--test-assertions--call-emacs-from-gc): On MS-Windows,
check also mod-test-emacs with ".exe" appended, before
skipping the tests.

5 years agoMake HIST arg of read-from-minibuffer work with buffer-local vars
Federico Tedin [Thu, 5 Dec 2019 09:30:17 +0000 (10:30 +0100)]
Make HIST arg of read-from-minibuffer work with buffer-local vars

* lisp/simple.el (minibuffer-history-values): New function, should be
used to access the minibuffer input history variable when the
minibuffer might be active.  If the variable is buffer-local, the
previous buffer's value will be used.
(goto-history-element): Use the new function to access the minibuffer
history.
(minibuffer-history-isearch-wrap): Use the new function to access the
minibuffer history.
* src/minibuf.c (read_minibuf): Switch to previous buffer temporarily
before updating history list (Bug#38317).
(read-from-minibuffer): Extend documentation to mention that the
result of using the command will be added to the history list by
default.
* doc/lispref/minibuf.texi (Minibuffer History): Mention the
possibility of using a buffer-local variable as history.
* etc/NEWS: Announce changes.

5 years agoPacify GCC 9.2.1 with recent module changes
Paul Eggert [Thu, 5 Dec 2019 00:53:54 +0000 (16:53 -0800)]
Pacify GCC 9.2.1 with recent module changes

* src/emacs-module.c (module_encode): Remove unused decl.
(module_extract_big_integer): Pacify gcc -Wenum-compare.

5 years agoFix regex repetition of repetitions
Paul Eggert [Thu, 5 Dec 2019 00:53:39 +0000 (16:53 -0800)]
Fix regex repetition of repetitions

Problems reported by Mattias Engdegård in:
https://lists.gnu.org/r/emacs-devel/2019-12/msg00066.html
* lisp/gnus/gnus-util.el (gnus-emacs-version):
* lisp/mail/rfc2368.el (rfc2368-mailto-regexp):
* lisp/net/tramp-sh.el (tramp-sh-inotifywait-process-filter):
* lisp/obsolete/terminal.el (te-parse-program-and-args):
* lisp/org/org-table.el (org-table-wrap-region):
* lisp/progmodes/verilog-mode.el (verilog-inject-inst):
Avoid repetition-of-repetition in regexp.