1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-30 08:09:04 +00:00
Commit Graph

139385 Commits

Author SHA1 Message Date
Stefan Monnier
24b74c35d5 * lisp/ffap.el (ffap-read-file-or-url): Simplify further 2019-11-08 13:32:46 -05:00
Thierry Volpiatto
0a51c70122 * 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.
2019-11-08 10:20:40 -05:00
Eli Zaretskii
05167c1173 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)
2019-11-08 15:43:08 +01:00
João Távora
5761a1a393 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.
2019-11-08 10:18:33 +00:00
João Távora
d558d9fa1e 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.
2019-11-08 10:18:33 +00:00
Eli Zaretskii
42eaac3134 Minor copyedits in ELisp manual
* doc/lispref/lists.texi (Sets And Lists): Minor rewording of
the "Common Lisp note".  (Bug#37811)
2019-11-08 11:55:36 +02:00
Robert Pluim
063277c5ec 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.
2019-11-08 10:04:13 +01:00
Jimmy Aguilar Mena
8232325337 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).
2019-11-08 09:31:33 +01:00
Stefan Monnier
a070bd1c8b * lisp/emacs-lisp/easymenu.el: Don't quote lambdas
(easy-menu-do-define, easy-menu-make-symbol): Replace `(lambda ..)
with a closure.
2019-11-07 17:09:16 -05:00
Michael Albinus
e8bcf45f30 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.
2019-11-07 18:40:13 +01:00
Robert Pluim
8ce2ec15f4 Describe IPv6 format in docstring for 'make-network-process'
* src/process.c (Fmake_network_process): Add description of IPv6
address format.
2019-11-07 18:16:07 +01:00
Eli Zaretskii
e06324a032 Revert "Don't flash previous buffer when connecting with emacsclient"
This reverts commit 49fc040077.
It turns out that the fix for a minor aesthetical annoyance
caused much more serious bugs: bug#31038, bug#35726, Bug#37097,
2019-11-07 19:11:23 +02:00
Eli Zaretskii
1b715834c3 ; * etc/NEWS: Fix wording of last change. 2019-11-07 18:55:55 +02:00
Andrii Kolomoiets
e50587b1db 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
2019-11-07 18:53:04 +02:00
Eli Zaretskii
3df1cf75f2 ; * etc/NEWS: Minor copyedits in the Fido mode entry. 2019-11-07 16:16:12 +02:00
Michael Albinus
4ab7800126 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.
2019-11-07 12:03:19 +01:00
Stefan Kangas
ddb797cf4c 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)
2019-11-07 04:12:01 +01:00
Stefan Kangas
1428dfe630 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)
2019-11-07 01:48:13 +01:00
Juri Linkov
deb61da7a2 * 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
2019-11-07 01:14:58 +02:00
Juri Linkov
528485d017 * 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.
2019-11-07 01:01:12 +02:00
Juri Linkov
f5f40af1da * 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.
2019-11-07 00:59:28 +02:00
Paul Eggert
b5bcc6f9ea 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.
2019-11-06 11:48:23 -08:00
Alan Mackenzie
4ad6c932a8 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.
2019-11-06 19:35:43 +00:00
Eli Zaretskii
e72a48ee8b Minor fix in the Emacs manual
* doc/emacs/msdos.texi (ls in Lisp): Fix the description of
'ls-lisp-verbosity'.  (Bug#38077)
2019-11-06 19:22:11 +02:00
Stephen Gildea
9ce67baa9a 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.
2019-11-06 08:33:51 -08:00
Michael Albinus
da2df1c1b5 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.
2019-11-06 16:49:35 +01:00
Stefan Kangas
d30f5e7eee 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.
2019-11-06 15:01:37 +01:00
Paul Eggert
2b1dc8c26e Update from Gnulib
This incorporates:
2019-10-24 timespec-add, timespec-sub: simplify
* lib/timespec-add.c, lib/timespec-sub.c:
Copy from Gnulib.
2019-11-05 22:59:27 -08:00
Paul Eggert
6039acb861 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).
2019-11-05 22:55:51 -08:00
Stefan Kangas
0661a39d1b 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.
2019-11-06 01:19:23 +01:00
Stefan Kangas
0c293f1520 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.
2019-11-06 00:58:57 +01:00
Stefan Kangas
c91c145d61 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.
2019-11-06 00:49:19 +01:00
João Távora
a8dbb7cc86 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
2019-11-05 23:37:53 +00:00
Juri Linkov
fbcfee3ae4 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.
2019-11-06 01:35:47 +02:00
Juri Linkov
e4f49e87e7 * 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.
2019-11-06 01:21:57 +02:00
João Távora
213643a890 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.
2019-11-05 22:59:33 +00:00
João Távora
e1d24f3c4c 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.
2019-11-05 22:59:33 +00:00
Paul Eggert
e5f10c6755 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
2019-11-05 13:44:02 -08:00
Stefan Monnier
edec35aa94 * admin/unidata/uvs.el: Use lexical-binding 2019-11-05 15:05:38 -05:00
Stefan Monnier
ec5433f676 * lisp/doc-view.el (doc-view--revert-buffer): Fix last change 2019-11-05 14:33:36 -05:00
Stefan Kangas
d76bc06abc Declare unused macro package--push obsolete
* lisp/emacs-lisp/package.el (package--push): Declare obsolete.
2019-11-05 15:49:29 +01:00
Michael Albinus
d270d7d4ad 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.
2019-11-05 12:58:47 +01:00
Robert Pluim
91c732f687 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'.
2019-11-05 09:32:51 +01:00
Paul Eggert
3843711abd 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.
2019-11-04 23:39:55 -08:00
Paul Eggert
799d738bc7 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.
2019-11-04 23:39:55 -08:00
Paul Eggert
5ab29400a4 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.
2019-11-04 23:39:54 -08:00
Ronnie Schnell
96c8e4fa41 Fixes bug where restoring game saved in an endgame question room would show 'nil' as the question. 2019-11-04 13:54:48 -05:00
Michael Albinus
dd19cc3aa1 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.
2019-11-04 17:34:31 +01:00
Eli Zaretskii
a256e03bd9 Fix last change in dired.c
* src/dired.c (file_name_completion): Fix arguments to
Fcompare_strings.  (Bug#38056)
2019-11-04 17:39:12 +02:00
Stephen Gildea
1d4862e8c1 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.
2019-11-03 18:36:45 -08:00