1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-30 09:00:31 -08:00
Commit graph

139801 commits

Author SHA1 Message Date
Alan Third
021ecbfce7 * lisp/term/ns-win.el (ns-insert-working-text): Comment is obsolete. 2019-12-22 12:06:15 +00:00
João Távora
2fa8fd18df Improve sorting of flex completion style with non-nil minibuffer-default
This affects the behaviour of flex completion when there is a default
completion and the user hasn't entered any input pattern to flex-match
against.  It is most visible when icomplete-mode or fido-mode are
being used in conjunctio.

When using M-x man, for instance, the default completion is picked
from text around point.  Say it is "emacs" (for Emacs's man page).  It
will not match the intended completion, "emacs(1)", exactly.  If the
user hasn't yet given any input to the completion prompt, that
completion should bubble to top so that
icomplete-force-complete-and-exit will select it, but it didn't.

This new approach uses 'string-prefix-p' instead of 'equal' to find
the default to bubble to the top.  This strategy could eventually be
improved, most naturally by flex-matching the default string to all
the candidates and picking the highest scoring one.

Additionally, the new strategy only considers minibuffer-default if
there is no input in the minibuffer, which seems sensible and produces
a small but noticeable speedup.

* lisp/minibuffer.el (completion--flex-adjust-metadata):
Reformulate sorting strategy.
2019-12-22 12:52:32 +01:00
Masahiro Nakamura
ba042176d8 Fix display of working text on NS (Bug#23412, Bug#1453)
* lisp/term/ns-win.el (ns-insert-working-text):
(ns-delete-working-text): Change how working text is deleted to handle
changed order of operations.
* src/nsterm.m ([EmacsView insertText:]): Move deletion of working
text until after insertion of new text.

Copyright-paperwork-exempt: yes
2019-12-22 11:47:29 +00:00
Alan Third
bfc54230c5 Check if file is in iCloud drive (bug#38618)
* src/nsfns.m (ns_set_represented_filename): Check whether the file is
a `ubiquitous item', and if so don't display a proxy icon.
2019-12-22 11:47:28 +00:00
Juri Linkov
36abf68646 * lisp/tab-bar.el: Rename tab-bar-list to tab-switcher (bug#38624) 2019-12-22 01:10:56 +02:00
Juri Linkov
485b423e8f New variable set-message-function to show message at the end of the minibuffer
* doc/lispref/display.texi (Displaying Messages): Document
set-message-function and clear-message-function.

* lisp/minibuffer.el (minibuffer-message-clear-timeout): New defcustom.
(minibuffer-message-timer, minibuffer-message-overlay): New variables.
(set-minibuffer-message, clear-minibuffer-message): New functions.
(set-message-function, clear-message-function): Set variables to
set-minibuffer-message and clear-minibuffer-message respectively.

* src/keyboard.c (read_char): Call clear_message when
Vclear_message_function is a function.

* src/xdisp.c (set_message): Call Vset_message_function when it's a function.
(clear_message): Call Vclear_message_function when it's a function.
(syms_of_xdisp): New variables set-message-function and clear-message-function
(bug#38457).
2019-12-22 00:02:10 +02:00
Stephen Gildea
678a71ea2d backup-by-copying-when-privileged-mismatch applies to file gid, too.
* lisp/files.el (backup-by-copying-when-privileged-mismatch):  In addition
to checking the file uid, a second test is added: if the file gid is not
greater than backup-by-copying-when-privileged-mismatch,
backup-by-copying-when-mismatch will also be forced on.

* doc/emacs/files.texi, doc/lispref/backups.texi: Updated documentation.

Also fixed a typo in the Emacs reference manual, changing "higher" to
"no greater" so that the limit is no longer documented reversed.
2019-12-21 10:51:10 -08:00
Eli Zaretskii
59ce7609cb ;* src/process.c (read_process_output): Fix last change. 2019-12-21 20:18:05 +02:00
lin.sun
9b7f3b0f57 Add new function `python-shell-send-statement'
* lisp/progmodes/python.el (python-shell-send-statement): New function.
(python-mode-map): Bind it to key "C-c C-e", and define a python-menu
item for it.  (Bug#38426)
2019-12-21 11:13:27 +02:00
Eli Zaretskii
cc78faee7d Allow control of data amount read from subprocess in one chunk
* src/process.c (syms_of_process) <read-process-output-max>:
New variable.
(read_process_output): Use it instead of the hard-coded
constant 4096.  (Bug#38561)
Use SAFE_ALLOCA to support large buffers for reading process
output.

* etc/NEWS: Mention 'read-process-output-max'.
2019-12-21 10:47:31 +02:00
Stefan Monnier
0f7e3430bb * lisp/international/mule-cmds.el: Fix bug#38642
(universal-coding-system-argument): Adjust the code to the way
`universal-argument` works nowadays.  Handle `prefix-arg` a bit more
like `command_loop` does.

* test/lisp/international/mule-tests.el
(mule-cmds--test-universal-coding-system-argument): New test.
2019-12-20 17:34:38 -05:00
Dmitry Gutov
2c8f1539ab Speed up vc-dir-update
* lisp/vc/vc-dir.el (vc-dir-update): Speed up.
(https://lists.gnu.org/archive/html/emacs-devel/2019-12/msg00568.html)
2019-12-21 00:12:44 +02:00
Alan Mackenzie
52178a312d Elisp manual: mention parse-partial-sexp as the source of a parser state, etc
* doc/lispref/syntax.texi (Parser State): mention parse-partial-sexp as a
function returning a parser state, and the function to which one supplies a
parser state as an argument for continued parsing.
Refine the documentation of syntax-ppss-context, and correct the text
introducing it and another function.
2019-12-20 19:55:29 +00:00
Eli Zaretskii
0e19b5d757 Support setting OS names of threads on MS-Windows
* src/w32fns.c (setup_w32_kbdhook): Don't initialize
is_debugger_present here...
(globals_of_w32fns): ...initialize it here.  Also initialize
the new global variable set_thread_description.
* src/systhread.c: [WINDOWSNT] Include mbctype.h
(w32_set_thread_name): New function.
(MS_VC_EXCEPTION): New macro.
(THREADNAME_INFO, IsDebuggerPresent_Proc)
(SetThreadDescription_Proc): New typedefs.
(w32_beginthread_wrapper): Call w32_set_thread_name to set the
name of the new thread.
* src/thread.h (struct thread_state): New member thread_name.
* src/thread.c (Fmake_thread): Set the thread_name field of
the new thread object.
(run_thread): Free the thread_name member after the thread
exits.
2019-12-20 20:59:07 +02:00
Michael Albinus
85a60da92d Fix error in tramp-process-sentinel
* lisp/net/tramp.el (tramp-process-sentinel): Check, that process
buffer is alive.
2019-12-20 13:32:24 +01:00
Juri Linkov
dad47bff3d * lisp/tab-bar.el: Sort tab names by recency for tab switching (bug#38624)
* lisp/tab-bar.el (tab-bar--tabs-recent): New function with code
extracted from tab-bar--tab-index-recent.
(tab-bar-switch-to-tab): Use tab-bar--tabs-recent in interactive spec
to sort names of tabs by recency for default values of completing-read.
(tab-prefix-map): Bind RET to tab-bar-select-tab-by-name, and 'm' to tab-move.
2019-12-20 01:18:28 +02:00
Michael Albinus
0bc00cda3c ; Fix typos in ange-ftp.el (bug#38660) 2019-12-19 09:34:44 +01:00
Mattias Engdegård
d55f2f74f5 More precise 'regexp-opt' documentation
* lisp/emacs-lisp/regexp-opt.el (regexp-opt):
* doc/lispref/searching.texi (Regexp Functions):
Be more specific about how the KEEP-ORDER argument actually works.
If nil, the regexp guarantees a longest match; this is the behaviour
that many callers implicitly rely on.
2019-12-18 12:46:30 +01:00
Michael Albinus
0a10795d0b Fix an error with remote file name in compile.el
* lisp/progmodes/compile.el (compilation-get-file-structure):
Compute proper remote file name.  (Bug#38648)
2019-12-18 10:19:19 +01:00
Wilson Snyder
6008b679f6 Verilog-Mode collected updates.
* lisp/progmodes/verilog-mode.el (verilog-compiler-directives): Support
indenting `uselib.
(verilog-read-decls): Fix AUTO* to ignore `protected regions.
(verilog-read-auto-template-middle): Fix AUTO_TEMPLATEs with multiple
module templates and at-REGEXPs, msg3183.  Reported by Berk Akinci.
2019-12-17 18:04:48 -05:00
Michael Albinus
dba1be0a9b 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.
2019-12-17 10:38:42 +01:00
Mattias Engdegård
4b2c2faab8 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.
2019-12-17 10:04:05 +01:00
Andrii Kolomoiets
1a2445c45f 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).
2019-12-17 01:50:09 +02:00
Dmitry Gutov
77fe255d90 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).
2019-12-17 01:50:09 +02:00
Eli Zaretskii
1e240a0ecd 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)
2019-12-16 17:43:30 +02:00
Juri Linkov
5aab1e83f5 * 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).
2019-12-16 02:18:00 +02:00
Juri Linkov
7254b63462 Revert aa89c84e00 (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)
2019-12-16 01:58:14 +02:00
Juri Linkov
1d52883047 * 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*".
2019-12-16 01:14:02 +02:00
Juri Linkov
468c871994 * lisp/tab-bar.el (tab-bar-handle-mouse): Handle close button. 2019-12-16 01:08:45 +02:00
Juri Linkov
b73c21fa97 * lisp/tab-bar.el (tab-bar-select-tab): Message about selected tab (bug#38624) 2019-12-16 01:03:55 +02:00
Robert Cochran
35388c5679 * lisp/tab-bar.el (tab-bar-close-other-tabs): Use tab close customs 2019-12-16 00:55:54 +02:00
Robert Cochran
c46a4931b1 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.
2019-12-16 00:55:47 +02:00
Phil Sainty
9b7f0de639 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.
2019-12-16 10:55:24 +13:00
Paul Eggert
9ee5af3150 Adjust intptr_t advice
* doc/lispref/internals.texi (C Integer Types): Say to prefer
uintptr_t when pointer arithmetic might overflow intptr_t.
2019-12-14 14:22:35 -08:00
Paul Eggert
bb42f6ef10 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.
2019-12-14 14:22:35 -08:00
Eli Zaretskii
a01a722282 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)
2019-12-14 20:02:11 +02:00
Stefan Monnier
0eff1a0191 * lisp/minibuffer.el (completion-pcm--find-all-completions): Simplify a bit 2019-12-14 12:40:29 -05:00
Michael Albinus
3f36cab333 * lisp/net/tramp.el (tramp-initial-file-name-regexp): Make it more precise. 2019-12-14 14:20:00 +01:00
Eli Zaretskii
7ebbec03ec Fix cross-references in ELisp manual
* doc/lispref/commands.texi (Misc Events, Special Events): Fix
cross-references.  (Bug#38520)
2019-12-14 13:56:29 +02:00
Eli Zaretskii
82a315b9e7 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)
2019-12-14 13:39:26 +02:00
Paul Eggert
c6e655c77b 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.
2019-12-13 17:07:16 -08:00
Juanma Barranquero
b2949d3926 xfaces.c: Silence spurious maybe-uninitialized compiler warning
* src/xfaces.c (face_inherited_attr): Initialize 'ok' to false.
2019-12-13 18:52:49 +01:00
João Távora
73f37da12d 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
2019-12-13 17:34:15 +01:00
Michael Albinus
84a8d07e7a * lisp/net/tramp.el (tramp-unload-tramp): Autoload function body. 2019-12-13 16:36:57 +01:00
Andrii Kolomoiets
51d3c95147 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.
2019-12-13 07:47:14 -05:00
Mattias Engdegård
82b4e48c59 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.
2019-12-13 13:30:14 +01:00
Philipp Stephani
b04086adf6 ; * src/emacs-module.h.in: Sort includes alphabetically. 2019-12-13 13:21:36 +01:00
Noam Postavsky
966abdba09 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.
2019-12-13 06:41:05 -05:00
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