Stefan Monnier [Tue, 12 Nov 2019 13:39:18 +0000 (08:39 -0500)]
* lisp/emacs-lisp/easymenu.el (easy-menu-make-symbol): Fix last change
Paul Eggert [Tue, 12 Nov 2019 06:54:06 +0000 (22:54 -0800)]
Fix a few more minor quoting problems.
Lars Ingebrigtsen [Tue, 12 Nov 2019 02:40:06 +0000 (03:40 +0100)]
Rename font-log-refontify
* lisp/font-lock.el (font-lock-debug-fontify): Rename to make it
clearer what the function is for.
* doc/lispref/modes.texi (Font Lock Basics): Ditto.
Stefan Monnier [Mon, 11 Nov 2019 22:14:30 +0000 (17:14 -0500)]
* lisp/startup.el (command-line): Fix last change in package--activated
Paul Eggert [Mon, 11 Nov 2019 18:30:13 +0000 (10:30 -0800)]
Fix some quoting glitches in doc strings
Paul Eggert [Mon, 11 Nov 2019 18:29:56 +0000 (10:29 -0800)]
Fix quoting glitch in formatting Gnus messages
* lisp/gnus/gnus-util.el (defmacro, gnus-message): Use
‘format-message’, not ‘format’, to be compatible with ‘message’.
Paul Eggert [Mon, 11 Nov 2019 18:29:09 +0000 (10:29 -0800)]
Fix glitch in generating cxterm doc strings
* lisp/international/titdic-cnv.el (tit-process-header):
In generated doc strings, escape \, ", ', and ` properly.
Currently only ' appears but we might as well future-proof this.
Wilson Snyder [Mon, 11 Nov 2019 16:47:54 +0000 (11:47 -0500)]
Verilog-Mode collected updates.
* lisp/progmodes/verilog-mode.el (verilog-read-decls): Fix to skip
over base64-encoded protected data while reading AUTO declarations.
Reported by Berend Ozceri.
(verilog-auto-inst-port, verilog-auto-inst-vector): Support 'unsigned'
in `verilog-auto-inst-vector'. Reported by Jeff Riley.
(verilog-read-decls): Fix to ignore `line in AUTOINST, git
bug18. Reported by Berend Ozceri.
(verilog-library-extensions): Support .va /.vah/.sva/.svah file
extensions to load verilog-mode for Verilog-AMS. Reported by Shareef
Jalloq.
(verilog-read-sub-decls-expr): Fix AUTOOUTPUT etc misparsing Verilog
casts, bug1526. Reported by Udi Finkelstein.
Stefan Kangas [Mon, 11 Nov 2019 15:05:21 +0000 (16:05 +0100)]
Add several configuration files to auto-mode-alist
* lisp/files.el (auto-mode-alist): Use conf-mode for .asoundrc,
.mairixrc, .mbsyncr, .msmtprc, .nvidia-settings-rc, .offlineimaprc,
.reportbugrc, .rtorrent.rc, .screenrc, .mpdconf, .notmuch-config. Use
conf-windows-mode for .redshift.conf. (Bug#38065)
Paul Eggert [Sun, 10 Nov 2019 23:01:06 +0000 (15:01 -0800)]
Document Lisp floats a bit better
* doc/lispref/numbers.texi (Float Basics):
* doc/misc/cl.texi (Implementation Parameters):
* lisp/emacs-lisp/cl-lib.el (cl-most-positive-float)
(cl-least-positive-float)
(cl-least-positive-normalized-float, cl-float-epsilon)
(cl-float-negative-epsilon):
Document IEEE floating point better. Don’t suggest that Emacs
might use some floating-point format other than IEEE format, as
Emacs currently assumes IEEE in several places and there seems
little point in removing those assumptions.
Juri Linkov [Sun, 10 Nov 2019 21:30:41 +0000 (23:30 +0200)]
* lisp/tab-bar.el: Better handling of closed-tabs in tab-bar-list.
* lisp/tab-bar.el (tab-bar-list-delete-from-list): Add closed tab to
tab-bar-closed-tabs.
(tab-bar-list-select): Don't add the closed intermediate tab to
tab-bar-closed-tabs.
Juri Linkov [Sun, 10 Nov 2019 21:21:46 +0000 (23:21 +0200)]
* lisp/autorevert.el: Use 'minibuffer-message' to not obscure the prompt.
* lisp/autorevert.el (auto-revert-handler): Use 'minibuffer-message'
instead of 'message'. Call it from the original window's buffer
that in case of the minibuffer should be current, so
minibuffer-message could add a message to it. (Bug#34614)
* lisp/emacs-lisp/ert-x.el (ert--make-message-advice): Add nil to
the list of values to not use for format-message, because
minibuffer-message calls 'message' with nil argument, and tests fail.
Stefan Kangas [Sun, 10 Nov 2019 21:15:31 +0000 (22:15 +0100)]
Make dired-get-subdir-min obsolete
* lisp/dired.el (dired-get-subdir-min): Redefine as obsolete function
alias for 'cdr'. (Bug#11571)
(dired-get-subdir, dired-get-subdir-max, dired-clear-alist)
(dired-next-subdir, dired-current-directory):
* lisp/dired-aux.el (dired-rename-subdir-2)
(dired-alist-sort, dired-insert-subdir-del)
(dired-insert-subdir-doupdate, dired-goto-subdir)
(dired-hide-subdir, dired-hide-all): Use 'cdr' instead of
the above obsolete function.
(dired-subdir-alist): Doc fix.
Co-authored-by: Drew Adams <drew.adams@oracle.com>
Juri Linkov [Sun, 10 Nov 2019 21:06:37 +0000 (23:06 +0200)]
Move read-char-from-minibuffer from simple.el to subr.el and document it.
* doc/lispref/minibuf.texi (Multiple Queries):
Document read-char-from-minibuffer (bug#10477, bug#38076).
* lisp/subr.el (read-char-history)
(read-char-from-minibuffer-map)
(read-char-from-minibuffer-map-hash)
(read-char-from-minibuffer-insert-char)
(read-char-from-minibuffer-insert-other, empty-history)
(read-char-from-minibuffer): Move from simple.el to subr.el.
Stefan Monnier [Sun, 10 Nov 2019 04:57:22 +0000 (23:57 -0500)]
* lisp/cedet/semantic/wisent/comp.el (wisent-struct): Remove
(core, shifts, reductions, errs): Use cl-defstruct instead.
Adjust all users of the set-<struct>-<field> setters to use
`setf` instead.
Jimmy Aguilar Mena [Sun, 10 Nov 2019 03:39:53 +0000 (04:39 +0100)]
Add extra bindings to fido-mode.
* lisp/icomplete.el (icomplete-fido-mode-map) : Add arrows and other
bindings to reproduce ido behaviour.
Glenn Morris [Sun, 10 Nov 2019 03:38:05 +0000 (19:38 -0800)]
Disable a portion of one doc-test
* test/src/doc-tests.el (doc-test-substitute-command-keys):
Disable component that fails twice in the past 5 weeks
due to changes in the minibuffer map.
Juri Linkov [Sat, 9 Nov 2019 22:51:25 +0000 (00:51 +0200)]
Don't overwrite y-or-n-p prompt by message from asynchronous man (bug#19064)
* lisp/man.el (Man-bgproc-sentinel): Postpone displaying the message
and deleting the buffer until exiting the code block with
with-current-buffer. Use minibuffer-message to display message
to handle possibly active minibuffer.
Juri Linkov [Sat, 9 Nov 2019 22:46:29 +0000 (00:46 +0200)]
Don't obscure the minibuffer by message (bug#17272)
* lisp/subr.el (do-after-load-evaluation): Use minibuffer-message
to not obscure a possibly active minibuffer.
* lisp/minibuffer.el (minibuffer-message):
Record message in the *Messages* buffer.
Juri Linkov [Sat, 9 Nov 2019 22:43:09 +0000 (00:43 +0200)]
Use the minibuffer to read answer in userlock.el (bug#38076)
* lisp/userlock.el: Rename 'fn' to 'filename'.
(ask-user-about-supersession-threat): Use read-char-from-minibuffer
instead of read-char-choice.
Stefan Monnier [Sat, 9 Nov 2019 22:42:36 +0000 (17:42 -0500)]
* lisp/startup.el (package--activated): Fix redundant definition
Stefan Monnier [Sat, 9 Nov 2019 18:32:20 +0000 (13:32 -0500)]
* lisp/ffap.el (ffap-read-file-or-url): Don't use url-file-handler
Simplify accordingly (and don't call substitute-in-file-name redundantly).
Juri Linkov [Sat, 9 Nov 2019 22:32:09 +0000 (00:32 +0200)]
hack-local-variables-confirm uses the minibuffer to read answer (bug#38076)
* lisp/files.el (hack-local-variables-confirm):
Use read-char-from-minibuffer instead of read-char-choice.
Remove special handling of original window scrolling
that is now supported in the minibuffer. This fixes
https://lists.gnu.org/archive/html/emacs-devel/2019-10/msg01020.html
(files--ask-user-about-large-file): Use read-char-from-minibuffer
instead of read-char-choice.
Juri Linkov [Sat, 9 Nov 2019 22:21:26 +0000 (00:21 +0200)]
Add CHARS arg to read-char-from-minibuffer compatible with read-char-choice.
* lisp/simple.el (read-char-history):
Rename from read-char-from-minibuffer-history. (Bug#38076)
(read-char-from-minibuffer-insert-char):
Rename from read-char-from-minibuffer-self-insert.
(read-char-from-minibuffer-map-hash): New defconst.
(read-char-from-minibuffer-insert-other): New command.
(read-char-from-minibuffer): Add optional args CHARS and HISTORY.
(zap-to-char): Use 'read-char-history as HISTORY arg of
read-char-from-minibuffer.
* lisp/emacs-lisp/map-ynp.el (read-answer): Use sit-for instead of sleep-for.
Replace short answer history yes-or-no-p-history with read-char-history.
Juri Linkov [Sat, 9 Nov 2019 22:04:13 +0000 (00:04 +0200)]
'y-or-n-p' now uses the minibuffer to read 'y' or 'n' answer (bug#38076)
* doc/lispref/minibuf.texi (Yes-or-No Queries): Update the fact
that y-or-n-p uses the minibuffer.
* lisp/subr.el (y-or-n-p-history-variable): New variable.
(y-or-n-p-map): New keymap.
(y-or-n-p-insert-y, y-or-n-p-insert-n, y-or-n-p-insert-other):
New commands.
(y-or-n-p): Rewrite to use read-from-minibuffer and make-composed-keymap
with y-or-n-p-map and query-replace-map.
Juri Linkov [Sat, 9 Nov 2019 21:32:46 +0000 (23:32 +0200)]
Run scroll/recenter commands from minibuffer in original window (bug#38076)
* lisp/minibuffer.el (with-minibuffer-selected-window): New macro.
(minibuffer-recenter-top-bottom, minibuffer-scroll-up-command)
(minibuffer-scroll-down-command, minibuffer-scroll-other-window):
(minibuffer-scroll-other-window-down): New commands.
(minibuffer-local-map): Remap recenter/scroll symbols to their
minibuffer wrappers: recenter-top-bottom to minibuffer-recenter-top-bottom.
* src/window.c (Fother_window_for_scrolling): Use 'lambda' value for
MINIBUF arg of Fnext_window, so minibuffer-scroll-other-window and
minibuffer-scroll-other-window-down doesn't try to scroll the
minibuffer window.
Karl Fogel [Mon, 4 Nov 2019 20:39:14 +0000 (14:39 -0600)]
Improve an error about the message signer
* lisp/gnus/mml-sec.el (mml-secure-epg-sign): Don't suggest setting
`mml-secure-smime-sign-with-sender' if it's already non-nil.
Lars Ingebrigtsen [Sat, 9 Nov 2019 20:02:18 +0000 (21:02 +0100)]
Fix font-lock-keywords slightly
* lisp/font-lock.el (font-lock-keywords): Tweak doc string
slightly (bug#35005).
Eli Zaretskii [Sat, 9 Nov 2019 19:56:30 +0000 (21:56 +0200)]
Fix case-insensitive completion of buffer names
* test/src/minibuf-tests.el (test-try-completion-ignore-case):
New test, suggested by Stefan Monnier <monnier@iro.umontreal.ca>.
* src/minibuf.c (Ftry_completion): Don't treat strings that
are identical but for the case as if they were identical for
the purposes of not counting the same string twice. This
fixes case-insensitive completion when all the candidates are
identical but for the letter-case. (Bug#11339)
Eli Zaretskii [Sat, 9 Nov 2019 19:40:53 +0000 (21:40 +0200)]
Fix an error in selecting encoding when writing zip files
* lisp/international/mule-cmds.el (select-safe-coding-system):
Treat no-conversion-multibyte that came from find-auto-coding
the same as no-conversion for the purposes of encoding. The
same logic that considers no-conversion always safe should do
the same with no-conversion-multibyte. (Bug#38155)
Glenn Morris [Sat, 9 Nov 2019 19:17:20 +0000 (11:17 -0800)]
* lisp/progmodes/cc-vars.el (c-mark-wrong-style-of-comment):
Fix version.
João Távora [Sat, 9 Nov 2019 14:54:09 +0000 (14:54 +0000)]
Revert "Nudge icomplete-mode a little closer to fido-mode"
Fixes bug#38131.
This is not the best way to have fido-mdoe emulate that particular bit
of ido-mode.
This reverts commit
5761a1a3939e23d8e8c725241dd9398a12f191b0.
João Távora [Fri, 8 Nov 2019 23:44:44 +0000 (23:44 +0000)]
Rename some commands to reflect they are fido-mode specific
* lisp/icomplete.el (icomplete-fido-kill)
(icomplete-fido-delete-char, icomplete-fido-ret)
(icomplete-fido-backward-updir): Rename from icomplete-magic-ido-*
versions.
(icomplete-fido-mode-map): Use new command names.
João Távora [Fri, 8 Nov 2019 23:40:18 +0000 (23:40 +0000)]
Protect flex's display-sort-function against 0-length candidates
* lisp/minibuffer.el (completion--flex-adjust-metadata): Assume a
candidate missing a score has a score of 0.
Alan Mackenzie [Sat, 9 Nov 2019 14:30:52 +0000 (14:30 +0000)]
Widen around c-font-lock-fontify-region. This fixes bug #38049.
* lisp/progmodes/cc-mode (c-font-lock-fontify-region): Widen in this function,
to ensure that the CC Mode font locking mechanism can examine characters
outside the given region.
Alan Mackenzie [Sat, 9 Nov 2019 12:09:30 +0000 (12:09 +0000)]
CC Mode. Allow fontification of "wrong" style comments with warning face.
This fixes bug #4192.
* etc/NEWS: Add a new entry.
* lisp/progmodes/cc-defs.el (c-font-lock-flush): New macro.
* lisp/progmodes/cc-cmds.el (c-toggle-comment-style): On toggling the comment
style, invoke c-font-lock-flush when c-mark-wrong-style-of-comment is non-nil,
to cause that marking to be done instead on the other style of comment.
* lisp/progmodes/cc-fonts.el (c-maybe-font-lock-wrong-style-comments): New
function.
(c-cpp-matchers): Call c-maybe-font-lock-wrong-style-comments when
appropriate.
* lisp/progmodes/cc-vars.el (c-mark-wrong-style-of-comment): New customizable
option.
* doc/misc/cc-mode.texi (top level, Indentation Commands, Guessing the Style,
Custom Macros): For some opening quote marks, correct '' to ``.
(Minor Modes): Add an xref to the new page "Wrong Comment Style" in a
footnote.
(Wrong Comment Style): New page.
Nick Helm [Mon, 14 Oct 2019 01:11:25 +0000 (14:11 +1300)]
Fix unresponsive Help menu in macOS
* src/nsterm.m (ns_check_menu_open): Don't postpone mouse drag and
non-user-generated mouse down events (Bug#31371).
Eli Zaretskii [Sat, 9 Nov 2019 09:53:02 +0000 (11:53 +0200)]
Avoid compiler warnings in addpm.c and ddeclient.c
* nt/ddeclient.c (DdeCallback):
* nt/addpm.c (DdeCallback): Modify types of the last 2
arguments to avoid compiler warnings in 64-bit builds.
(Bug#38040)
Eli Zaretskii [Sat, 9 Nov 2019 09:43:19 +0000 (11:43 +0200)]
Fix last change
* lisp/simple.el (goto-history-element)
(next-history-element): Fix quoting of "future history".
* doc/lispref/minibuf.texi (Minibuffer Commands)
(Text from Minibuffer): Add index entry and cross-reference
for "future history". (Bug#38026)
Hong Xu [Sat, 2 Nov 2019 01:06:44 +0000 (18:06 -0700)]
Mention future history in history-related minibuffer commands
* lisp/simple.el (goto-history-element):
* doc/lispref/minibuf.texi (Minibuffer Commands): Explain
negative NABS.
* lisp/simple.el (next-history-element):
* doc/lispref/minibuf.texi (Minibuffer Commands): Mention
"future history." (Bug#38026)
Paul Eggert [Sat, 9 Nov 2019 01:07:13 +0000 (17:07 -0800)]
Fix some quoting glitches in doc strings
This also fixes a misplaced "only".
Stefan Monnier [Fri, 8 Nov 2019 18:59:23 +0000 (13:59 -0500)]
* lisp/ffap.el (ffap-read-file-or-url): Fix some URL cases
Stefan Monnier [Fri, 8 Nov 2019 18:32:46 +0000 (13:32 -0500)]
* lisp/ffap.el (ffap-read-file-or-url): Simplify further
Thierry Volpiatto [Fri, 8 Nov 2019 15:20:40 +0000 (10:20 -0500)]
* lisp/ffap.el (ffap-read-file-or-url): Use `read-file-name`
Since we use `url-handler-mode` to deal with URLs, `read-file-name`
works just as well, with the added benefit that it interacts correctly
with packages that rebind `read-file-name-function`, such as Helm.
(ffap-read-url-internal, ffap-read-file-or-url-internal): Remove, unused.
Eli Zaretskii [Fri, 8 Nov 2019 14:41:26 +0000 (15:41 +0100)]
Fix MS-Windows version reference in FAQ
* doc/misc/efaq-w32.texi (Which versions of Windows): Clarify that we
support all recent versions of MS-Windows. (Bug#38023)
João Távora [Fri, 8 Nov 2019 00:11:34 +0000 (00:11 +0000)]
Nudge icomplete-mode a little closer to fido-mode
* lisp/icomplete.el (icomplete-completions): Don't use ellipsis when
truncating determ in fido-mode. Highlight the center part of
determ with icomplete-first-match.
João Távora [Thu, 7 Nov 2019 23:54:21 +0000 (23:54 +0000)]
Have pcm styles apply faces to face prop, not font-lock-face
This is the way the basic completion styles work. This fixes
candidate highlighting in icomplete.
* lisp/minibuffer.el (completion-pcm--hilit-commonality): Apply
faces to 'face property, not font-lock-face.
Eli Zaretskii [Fri, 8 Nov 2019 09:55:36 +0000 (11:55 +0200)]
Minor copyedits in ELisp manual
* doc/lispref/lists.texi (Sets And Lists): Minor rewording of
the "Common Lisp note". (Bug#37811)
Robert Pluim [Thu, 7 Nov 2019 15:16:39 +0000 (16:16 +0100)]
Ensure building and running on non-IPv6 capable hosts works
* src/process.c (Fmake_network_process) [AF_INET6]: Only build ::1
localhost when IPv6 is supported.
(Fnetwork_lookup_address_info) [AF_INET6]: Move check for Qipv6 inside
ifdef, since its definition depends on AF_INET6. Don't return IPv6
addresses when they're not supported.
* test/src/process-tests.el (lookup-family-specification,
lookup-google): Only do IPv6 lookup if IPv6 is supported.
Jimmy Aguilar Mena [Fri, 8 Nov 2019 08:31:33 +0000 (09:31 +0100)]
Handle case where a face's :extend attribute is unspecified (Bug#37774)
* src/xfaces.c (merge_face_vectors, merge_named_face): Handle case
where the :extend attribute's value is 'unspecified' (Bug#37774).
Stefan Monnier [Thu, 7 Nov 2019 22:08:51 +0000 (17:08 -0500)]
* lisp/emacs-lisp/easymenu.el: Don't quote lambdas
(easy-menu-do-define, easy-menu-make-symbol): Replace `(lambda ..)
with a closure.
Michael Albinus [Thu, 7 Nov 2019 17:40:13 +0000 (18:40 +0100)]
Handle different system names of w32 in Tramp (Bug#38079)
* lisp/net/tramp.el (tramp-restricted-shell-hosts-alist):
Initialize with `system-name' in small and capital chars.
Robert Pluim [Thu, 7 Nov 2019 13:19:43 +0000 (14:19 +0100)]
Describe IPv6 format in docstring for 'make-network-process'
* src/process.c (Fmake_network_process): Add description of IPv6
address format.
Eli Zaretskii [Thu, 7 Nov 2019 17:11:23 +0000 (19:11 +0200)]
Revert "Don't flash previous buffer when connecting with emacsclient"
This reverts commit
49fc040077b33bd1e78ee425575e76329b772a41.
It turns out that the fix for a minor aesthetical annoyance
caused much more serious bugs: bug#31038, bug#35726, Bug#37097,
Eli Zaretskii [Thu, 7 Nov 2019 16:55:55 +0000 (18:55 +0200)]
; * etc/NEWS: Fix wording of last change.
Andrii Kolomoiets [Sat, 2 Nov 2019 16:08:13 +0000 (18:08 +0200)]
python.el: Pdbtracking improvements
Allow not to kill buffers when pdbtracking session is finished.
Pdbtracking session considered finished judging from the user input.
* lisp/progmodes/python.el (python-pdbtrack-kill-buffers): New
customizable variable.
(python-pdbtrack-set-tracked-buffer): Use it.
(python-pdbtrack-unset-tracked-buffer)
(python-pdbtrack-tracking-finish): New functions.
(python-pdbtrack-continue-command, python-pdbtrack-exit-command):
New customizable variables.
(python-pdbtrack-process-sentinel): New function. Finish
pdbtracking session when process is killed.
(python-pdbtrack-prev-command-continue): New variable.
(python-pdbtrack-comint-input-filter-function): New function.
Finish pdbtracking session based on commands sent to pdb.
(python-pdbtrack-comint-output-filter-function): Unset/set
tracking buffer if looking at pdb prompt; finish pdbtracking
session if filename of current stack frame starts with
"<" e.g. "<stdin>".
(python-pdbtrack-comint-output-filter-function): Don't override
overlay-arrow-string.
(python-pdbtrack-setup-tracking): New function.
(inferior-python-mode): Use it.
(python-pdbtrack-stacktrace-info-regexp): Default value is changed.
Must also match lines with filename like "<stdin>" and "<string>".
* etc/NEWS: Mention python-pdbtrack-kill-buffers
Eli Zaretskii [Thu, 7 Nov 2019 14:16:12 +0000 (16:16 +0200)]
; * etc/NEWS: Minor copyedits in the Fido mode entry.
Michael Albinus [Thu, 7 Nov 2019 11:03:19 +0000 (12:03 +0100)]
Make ange-ftp fit for tramp-tests
* lisp/net/ange-ftp.el (ange-ftp-repaint-minibuffer): Use empty message.
(ange-ftp-quote-string): Unquote the string.
(ange-ftp-substitute-in-file-name, ange-ftp-access-file)
(ange-ftp-copy-directory, ange-ftp-make-symbolic-link)
(ange-ftp-add-name-to-file): New defuns. Set 'ange-ftp property.
(ange-ftp-real-substitute-in-file-name)
(ange-ftp-real-copy-directory): New defuns.
(ange-ftp-file-name-as-directory): Care about `non-essential'.
(ange-ftp-file-attributes): Handle ID-STRING.
(ange-ftp-copy-file-internal, ange-ftp-rename-file)
(ange-ftp-make-directory): Improve error handling.
(ange-ftp-insert-directory): Initialize SWITCHES if they are nil.
* test/lisp/net/tramp-tests.el (ange-ftp-make-backup-files): Declare.
(tramp-test39-make-nearby-temp-file, tramp--test-ange-ftp-p): New defun.
(tramp-test05-expand-file-name-relative)
(tramp-test06-directory-file-name, tramp-test10-write-region)
(tramp-test11-copy-file, tramp-test12-rename-file)
(tramp-test17-insert-directory)
(tramp-test26-file-name-completion)
(tramp-test37-make-auto-save-file-name)
(tramp-test38-find-backup-file-name)
(tramp--test-special-characters): Use it.
Stefan Kangas [Thu, 7 Nov 2019 03:10:43 +0000 (04:10 +0100)]
Clean up major mode check in package-menu-mode
* lisp/emacs-lisp/package.el (package--ensure-package-menu-mode):
Extract function to warn about incorrect major mode...
(package-menu-toggle-hiding, package-menu-refresh)
(package-menu-execute): ...from here.
(package-menu--mark-upgrades-1): And here, but move call...
(package-menu-mark-upgrades): ...here instead.
(package-menu-hide-package, package-menu-mark-delete)
(package-menu-mark-install, package-menu-mark-unmark)
(package-menu-quick-help, package-menu-get-status)
(package-menu-filter-by-keyword, package-menu-filter-by-name)
(package-menu-clear-filter): Add call to new function. (Bug#37891)
Stefan Kangas [Thu, 7 Nov 2019 00:42:31 +0000 (01:42 +0100)]
Test that comint-password-prompt-regexp matches "git push"
* test/lisp/comint-tests.el (comint-testsuite-password-strings): Test
that 'comint-password-prompt-regexp' matches 'git push'
output. (Bug#20910)
Juri Linkov [Wed, 6 Nov 2019 23:14:58 +0000 (01:14 +0200)]
* lisp/dired-aux.el (dired-vc-rename-file): New defcustom.
(dired-rename-file): Call vc-rename-file when dired-vc-rename-file is non-nil.
* lisp/vc/vc.el (vc-rename-file): Allow renaming added files.
Call vc-file-clearprops on new file too for the case when
old and new files were renamed to each other back and forth.
https://lists.gnu.org/archive/html/emacs-devel/2019-11/msg00069.html
Juri Linkov [Wed, 6 Nov 2019 23:01:12 +0000 (01:01 +0200)]
* lisp/tab-bar.el (tab-bar-history-old): Rename from tab-bar-history-current.
(tab-bar-history-old-minibuffer-depth):
Rename from tab-bar-history--minibuffer-depth.
Juri Linkov [Wed, 6 Nov 2019 22:59:28 +0000 (00:59 +0200)]
* lisp/tab-line.el: More configurability for tab buffer groups.
* lisp/tab-line.el (tab-line-tabs-buffer-group-function)
(tab-line-tabs-buffer-group-sort-function)
(tab-line-tabs-buffer-groups-sort-function): New defvars.
(tab-line-tabs-buffer-group-name): Rename from
tab-line-tabs-buffer-groups--name and use tab-line-tabs-buffer-group-function.
(tab-line-tabs-buffer-groups): Use tab-line-tabs-buffer-groups-sort-function
and tab-line-tabs-buffer-group-sort-function.
(tab-line-new-tab): Let bind tab-line-tabs-buffer-groups to
mouse-buffer-menu-mode-groups.
Paul Eggert [Wed, 6 Nov 2019 19:47:39 +0000 (11:47 -0800)]
Simplify fixnum division slightly
* src/data.c (arith_driver): Streamline fixnum division a bit
more, and add a comment about why overflow is impossible.
This responds to a private comment by Stefan Monnier.
Alan Mackenzie [Wed, 6 Nov 2019 19:35:43 +0000 (19:35 +0000)]
Add a full set of CC Mode language variables to js.el.
This will allow js.el to work after maintenance changes in CC Mode, e.g. the
fix to bug #11165.
* lisp/progmodes/js.el (top level): Create a CC Mode derived language called
js-mode and based on Java Mode.
(js-mode): call c-init-language-vars for js-mode. Remove the direct settings
of several CC Mode language variables which are now defined through the
derived language mechanism. Call c-set-style and set up the needed style
variables c-block-comment-prefix and c-comment-prefix-regexp.
Eli Zaretskii [Wed, 6 Nov 2019 17:22:11 +0000 (19:22 +0200)]
Minor fix in the Emacs manual
* doc/emacs/msdos.texi (ls in Lisp): Fix the description of
'ls-lisp-verbosity'. (Bug#38077)
Stephen Gildea [Wed, 6 Nov 2019 16:31:48 +0000 (08:31 -0800)]
time-stamp: add support for time zone numeric offset
* time-stamp.el: Implement %:z as expanding to the numeric time zone
offset, to address the feature request of bug#32931. Do not document it
yet, to discourage compatibility problems in mixed Emacs 26 and Emacs 27
environments. Documentation will be added in a subsequent release at
least two years later. (We cannot yet use %z for numeric time zone
because in Emacs 26 it was documented to do something else.)
* time-stamp-tests.el (time-stamp-test-format-time-zone): expand this
test and break it into two tests, time-stamp-test-format-time-zone-name
and time-stamp-test-format-time-zone-offset.
Michael Albinus [Wed, 6 Nov 2019 15:49:35 +0000 (16:49 +0100)]
More error checks in Tramp's make-directory
* lisp/net/tramp-adb.el (tramp-adb-handle-make-directory):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-make-directory):
* lisp/net/tramp-sh.el (tramp-sh-handle-make-directory):
* lisp/net/tramp-smb.el (tramp-smb-handle-make-directory):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-make-directory):
Signal `file-already-exists' if DIR exists.
* test/lisp/net/tramp-tests.el (tramp-test04-substitute-in-file-name):
Fix thinko.
(tramp-test13-make-directory, tramp-test14-delete-directory)
(tramp-test15-copy-directory): Extend tests.
Stefan Kangas [Wed, 6 Nov 2019 13:48:23 +0000 (14:48 +0100)]
Fix problem with my last commit in package.el
* lisp/emacs-lisp/package.el (package-menu--refresh-archives): Rename
from duplicated name package-menu--refresh. (Bug#38084)
(package-menu-mode, list-packages): Use new name.
Paul Eggert [Wed, 6 Nov 2019 06:59:00 +0000 (22:59 -0800)]
Update from Gnulib
This incorporates:
2019-10-24 timespec-add, timespec-sub: simplify
* lib/timespec-add.c, lib/timespec-sub.c:
Copy from Gnulib.
Paul Eggert [Wed, 6 Nov 2019 06:55:23 +0000 (22:55 -0800)]
Remove unneeded overflow check in integer division
* src/data.c (arith_driver): Remove unnecessary runtime test,
since integer overflow is impossible on division of fixnums,
given that the worst case is MOST_NEGATIVE_FIXNUM / -1 which is
representable as an EMACS_INT (albeit not as a fixnum).
Stefan Kangas [Wed, 6 Nov 2019 00:19:23 +0000 (01:19 +0100)]
Avoid changing value of defcustom package-enable-at-startup
* lisp/emacs-lisp/package.el (package--activated): New variable to
avoid changing value of defcustom 'package-enable-at-startup'.
(package-initialize): Don't set 'package-enable-at-startup'.
(package-initialize, package-activate-all): Set 'package--activated'
instead of 'package-enable-at-startup'.
(package--initialized): Add doc string.
* lisp/startup.el (command-line): Check if 'package--activated' is
non-nil before activating packages.
* doc/lispref/package.texi (Packaging Basics): Update docs.
Stefan Kangas [Tue, 5 Nov 2019 23:58:57 +0000 (00:58 +0100)]
Make 'g' refresh package data in package menu
* lisp/emacs-lisp/package.el (package-menu--refresh): Rename from
'package-menu-refresh', make internal and non-interactive.
(package-menu-mode-map, package-menu-mode-menu, package-menu-mode)
(list-packages): Use the above. (Bug#35504)
(package-menu-refresh): Redefine as obsolete fuction alias for
'revert-buffer'.
* doc/emacs/package.texi (Package Menu): Document it.
* etc/NEWS: Announce it.
Stefan Kangas [Tue, 5 Nov 2019 23:49:02 +0000 (00:49 +0100)]
Rename *-multiframe-window to *-window-any-frame
Suggested by Drew Adams.
* lisp/frame.el
(next-multiframe-window): Define as obsolete alias for...
(next-window-any-frame): ...new function name.
(previous-multiframe-window): Define as obsolete alias for...
(previous-window-any-frame): ...new function name. (Bug#12436)
* lisp/term/ns-win.el (global-map): Use new command name.
* doc/emacs/windows.texi (Other Window): Document it.
* etc/NEWS: Announce it.
João Távora [Tue, 5 Nov 2019 23:37:30 +0000 (23:37 +0000)]
Follow JSONRPC spec by not sending :result field on errors
Also don't send :error field on non-errors.
* lisp/jsonrpc.el (jsonrpc--reply): Don't send :result and :error
if none supplied.
(Version): Bump to 1.0.8
Juri Linkov [Tue, 5 Nov 2019 23:35:47 +0000 (01:35 +0200)]
Add prefix arg to more isearch commands (bug#14563)
* lisp/isearch.el (isearch--yank-char-or-syntax)
(isearch-yank-word-or-char, isearch-yank-symbol-or-char)
(isearch-yank-until-char): Add optional prefix arg.
Juri Linkov [Tue, 5 Nov 2019 23:21:57 +0000 (01:21 +0200)]
* lisp/tab-line.el: New option for tabs where buffers are grouped by mode.
* lisp/tab-line.el (tab-line-tabs-function): Add option
tab-line-tabs-buffer-groups.
(tab-line-tabs-buffer-groups): New defvar defaulted to
mouse-buffer-menu-mode-groups.
(tab-line-tabs-buffer-groups--name, tab-line-tabs-buffer-groups):
New functions.
(tab-line-format): Support tabs in the format '(tab (name . "name") ...)'.
(tab-line-select-tab): Move part of code to tab-line-select-tab-buffer.
(tab-line-select-tab-buffer): New function.
(tab-line-tab-current): Rename from tab-line-tab-selected.
João Távora [Tue, 5 Nov 2019 18:04:20 +0000 (18:04 +0000)]
Document fido-mode
* doc/emacs/buffers.texi (Icomplete): Document Fido Mode.
* etc/NEWS: Mention Fido Mode.
* lisp/icomplete.el (icomplete-mode): Ensure fido-mode is off.
(fido-mode): Ensure icomplete-mode is off.
(icomplete-magic-ido-ret): Don't force completions if no
completions.
João Távora [Sun, 3 Nov 2019 13:10:40 +0000 (13:10 +0000)]
New fido-mode, emulates ido-mode with icomplete-mode
* lisp/icomplete.el (icomplete-fido-mode-map): New variable.
(icomplete--fido-mode-setup): New function.
(fido-mode): New global minor mode.
Paul Eggert [Tue, 5 Nov 2019 21:43:44 +0000 (13:43 -0800)]
Pacify byte-compiler in calculator.el
* lisp/calculator.el (calculator-expt): Open-code cl-evenp to
pacify warning “the function ‘cl-evenp’ might not be defined”.
Problem reported by Juanma Barranquero in:
https://lists.gnu.org/r/emacs-devel/2019-11/msg00118.html
Stefan Monnier [Tue, 5 Nov 2019 20:05:38 +0000 (15:05 -0500)]
* admin/unidata/uvs.el: Use lexical-binding
Stefan Monnier [Tue, 5 Nov 2019 19:33:36 +0000 (14:33 -0500)]
* lisp/doc-view.el (doc-view--revert-buffer): Fix last change
Stefan Kangas [Tue, 5 Nov 2019 14:45:22 +0000 (15:45 +0100)]
Declare unused macro package--push obsolete
* lisp/emacs-lisp/package.el (package--push): Declare obsolete.
Michael Albinus [Tue, 5 Nov 2019 11:58:47 +0000 (12:58 +0100)]
Improve Tramp's copy-directory
* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
* lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist):
Add `copy-directory'.
* lisp/net/tramp.el (tramp-handle-copy-directory): New defun.
Robert Pluim [Thu, 24 Jan 2019 13:35:30 +0000 (14:35 +0100)]
Always check for client-certificates
* lisp/net/network-stream.el
(network-stream-use-client-certificates): New user option.
(open-network-stream): If 'network-stream-use-client-certificates'
is t, and the user hasn't specified :client-certificate, do
certificate lookups via 'auth-source'.
(network-stream-certificate): Only return key and certificate
files that exist.
* doc/lispref/processes.texi (Network): Document new
client-certificate behavior.
* etc/NEWS: Document 'network-stream-use-client-certificates'.
Paul Eggert [Tue, 5 Nov 2019 07:19:36 +0000 (23:19 -0800)]
Simplify calculator-expt
* lisp/calculator.el (calculator-expt): Simplify, now that
expt does the right thing if the first arg is -1, 0, or 1.
Paul Eggert [Tue, 5 Nov 2019 07:17:06 +0000 (23:17 -0800)]
Overflow errors are range errors
* etc/NEWS: Mention this.
* doc/lispref/errors.texi (Standard Errors):
Document overflow-error, which was formerly undocumented.
It is a range error, not a domain error.
* src/data.c (syms_of_data): overflow-error and (undocumented)
underflow-error are subtypes range-error, not domain-error.
This fixes bugs in timezone-time-from-absolute and in
erc-ctcp-reply-PING.
Paul Eggert [Tue, 5 Nov 2019 07:10:12 +0000 (23:10 -0800)]
Don’t signal overflow for (expt 1 bignum)
Similarly for (expt 0 bignum) and (expt -1 bignum).
The result is always a -1, 0 or 1, so do not signal overflow.
* src/data.c (expt_integer): Do not signal an overflow if
-1 <= X <= 1. Be clearer about when overflow is signaled.
* test/src/floatfns-tests.el (bignum-expt): Test this.
Ronnie Schnell [Mon, 4 Nov 2019 18:54:48 +0000 (13:54 -0500)]
Fixes bug where restoring game saved in an endgame question room would show 'nil' as the question.
Michael Albinus [Mon, 4 Nov 2019 16:34:31 +0000 (17:34 +0100)]
Improve Tramp error handling
* lisp/net/tramp.el (tramp-set-syntax): Add missing argument.
(tramp-signal-hook-function): Make it more robust.
(tramp-handle-directory-files):
* lisp/net/tramp-adb.el
(tramp-adb-handle-directory-files-and-attributes)
(tramp-adb-handle-copy-file, tramp-adb-handle-rename-file):
* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
* lisp/net/tramp-rclone.el (tramp-rclone-do-copy-or-rename-file)
(tramp-rclone-handle-directory-files):
* lisp/net/tramp-sh.el (tramp-sh-handle-directory-files-and-attributes)
(tramp-sh-handle-copy-directory, tramp-do-copy-or-rename-file):
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory)
(tramp-smb-handle-copy-file, tramp-smb-handle-directory-files)
(tramp-smb-handle-rename-file):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file):
Improve error handling.
* test/lisp/net/tramp-tests.el (tramp-test11-copy-file)
(tramp-test12-rename-file, tramp-test14-delete-directory)
(tramp-test15-copy-directory, tramp-test16-directory-files)
(tramp-test19-directory-files-and-attributes): Extend tests.
Eli Zaretskii [Mon, 4 Nov 2019 15:39:12 +0000 (17:39 +0200)]
Fix last change in dired.c
* src/dired.c (file_name_completion): Fix arguments to
Fcompare_strings. (Bug#38056)
Stephen Gildea [Mon, 4 Nov 2019 02:36:05 +0000 (18:36 -0800)]
Fix English grammar in some doc strings and comments
(files.el subr.el): Fix some grammar errors in doc strings and comments.
(frame.c fringe.c image.c xfns.c xterm.c): Fix some English grammar
errors in doc strings.
Paul Eggert [Mon, 4 Nov 2019 01:38:13 +0000 (17:38 -0800)]
Improve time documentation a bit more
* doc/lispref/os.texi (Time of Day, Time Conversion)
(Time Parsing, Time Calculations): Improve doc.
Juri Linkov [Sun, 3 Nov 2019 21:52:23 +0000 (23:52 +0200)]
* lisp/help-fns.el (describe-variable): Add quotes to symbol value of origval.
Juri Linkov [Sun, 3 Nov 2019 21:48:53 +0000 (23:48 +0200)]
* lisp/tab-bar.el: Better handling of tab-bar-history.
* lisp/tab-bar.el (tab-bar-history-limit): Increase to 10 since wc
is not saved to the desktop file anymore, so doesn't affect its size.
(tab-bar-history--pre-change, tab-bar--history-change):
Store wc before possibly entering the minibuffer.
Juri Linkov [Sun, 3 Nov 2019 21:44:44 +0000 (23:44 +0200)]
* lisp/tab-bar.el: Filter out non-persistent tab parameters from frameset.
* lisp/tab-bar.el (frameset-filter-tabs): New function
added to 'frameset-filter-alist' for frame parameter 'tabs'.
(tab-bar--tab): Remove ws-bl/ws-bbl that are not needed because
frameset doesn't save frame buffer-list to desktop anyway.
(tab-bar-select-tab): Remove ws-bl/ws-bbl related code.
* lisp/emacs-lisp/seq.el (seq-reduce): Add autoload cookie.
Stefan Kangas [Sun, 3 Nov 2019 16:45:48 +0000 (17:45 +0100)]
Handle truncate-lines in customize-group
* lisp/cus-edit.el (custom-group--draw-horizontal-line): New
function to draw horizontal lines which handles a non-nil value of
'truncate-lines'. (Bug#25308)
(custom-group-value-create): Use it.
Co-authored-by: Jonas Bernoulli <jonas@bernoul.li>
Lars Ingebrigtsen [Sun, 3 Nov 2019 16:19:26 +0000 (17:19 +0100)]
Fix doc of font-lock-syntactic-face-function
* doc/lispref/modes.texi (Syntactic Font Lock): Don't refer to
no-longer-existing OTHER-VARS (bug#17730) and include an example.
Eli Zaretskii [Sun, 3 Nov 2019 16:13:38 +0000 (18:13 +0200)]
Fix file-tests.el on MS-Windows
* test/lisp/files-tests.el
(files-tests-file-name-non-special-start-file-process): On
MS-Windows, wait till the process dies before returning from
the files-tests--with-temp-non-special macro, to ensure the
temporary directory is successfully deleted.
Eli Zaretskii [Sun, 3 Nov 2019 16:08:45 +0000 (18:08 +0200)]
Fix case-insensitive completion of non-ASCII file names
* src/dired.c (scmp): Comment on (non)applicability to
comparisons of non-ASCII strings case-insensitively.
(file_name_completion): Decode early the file names read from
the directory, and use the decoded names for comparison when
letter-case should be ignored. (Bug#11339)