1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-27 07:37:33 +00:00
Commit Graph

74800 Commits

Author SHA1 Message Date
Stephen Gildea
32d1c1fc1f ; Grammar in simple.el doc strings and comments
* lisp/simple.el: Improve the English grammar in some doc strings
and comments.
2019-11-16 21:19:22 -08:00
Juri Linkov
3dcf06bfa0 * lisp/tab-bar.el: Add missing arg.
* lisp/tab-bar.el (tab-bar-list-next-line)
(tab-bar-list-prev-line): Add missing interactive spec for prefix arg.

* lisp/mouse.el (mouse-buffer-menu-mode-groups): Add "Git" regexp
to match "Git-Region-History" mode name for "Version Control" group.
2019-11-17 00:19:42 +02:00
Juri Linkov
e4a62f8662 * lisp/simple.el (eval-expression-print-maximum-character): Use choice type.
https://lists.gnu.org/archive/html/emacs-devel/2019-11/msg00433.html
2019-11-17 00:10:19 +02:00
Juri Linkov
5ddec1365c * lisp/dired.el (dired-dwim-target): Add choice dired-dwim-target-next-visible
* lisp/dired-aux.el (dired-dwim-target-next): Add arg ALL-FRAMES.
(dired-dwim-target-next-visible): New function.

* doc/emacs/dired.texi (Operating on Files): Describe function value
of dired-dwim-target.  (Bug#35385)
2019-11-17 00:06:16 +02:00
Shingo Tanaka
a6a9b3061f Fix moving files with duplicate names to trash-can
* lisp/files.el (move-file-to-trash): Fix file name in
trash-can when another deleted file under the same name is
already stored there.  (Bug#37922)

Copyright-paperwork-exempt: yes.
2019-11-16 14:54:19 +02:00
Michael Orlitzky
d03915650e tex-mode: paragraph separator groups text and comments
* lisp/textmodes/tex-mode.el (latex-mode): Don't wrap text with
leading spaces into preceding comments (bug#38152).

Copyright-paperwork-exempt: yes
2019-11-16 08:15:48 +01:00
Lars Ingebrigtsen
246f050ab4 Don't move point on undefined keystrokes in the article buffer
* lisp/gnus/gnus-art.el (gnus-article-read-summary-keys): Don't
move point on undefined commands (bug#38227).
2019-11-16 06:11:56 +01:00
Lars Ingebrigtsen
461101d67c Make button-1 work on all Gnus buttons
* lisp/gnus/gnus-icalendar.el (gnus-icalendar-insert-button):
* lisp/gnus/gnus-art.el (gnus-insert-mime-button)
(gnus-mime-display-alternative, gnus-insert-prev-page-button)
(gnus-insert-next-page-button)
(gnus-insert-mime-security-button): Make button-1 work on all the
Gnus buttons (bug#38144).
2019-11-16 05:33:17 +01:00
Phil Sainty
c793395cca ; * lisp/so-long.el: Silence byte-compiler warnings 2019-11-16 12:16:05 +13:00
João Távora
7fea1a3f26 Make icomplete-tidy-shadowed-file-names less aggressive
When using this option and editing input, some transient situations
may arise that lead to file-name shadowing, but that shouldn't
necessarily lead to auto-delete behaviour, which will be suprising.

In '/foo/x/bar', if the user deletes the 'x', shadowing occurs, but
probably shouldn't.  So, somewhat like ido-mode, only auto-tidy
shadowed file names if the user is inserting text at end of input.

* lisp/icomplete.el (icomplete-exhibit): Check this-command.
(icomplete-tidy-shadowed-file-names): Tweak docstring.
2019-11-15 20:27:18 +00:00
Stefan Monnier
87347a5bbc * lisp/progmodes/perl-mode.el (perl-calculate-indent): Indent qw(...)
Fix initialization of `state`.
Special-case `qw(...)` because we do want to indent its contents.
2019-11-15 13:19:37 -05:00
Robert Pluim
904146cf79 Used magic-fallback-mode-alist to detect .doc files (Bug#20891)
This avoids running doc-view-mode on files that are actually text
files.

* lisp/files.el (auto-mode-alist): Don't use doc-view-mode-maybe
for .doc (but continue to do so for .docx).
(magic-fallback-mode-alist): Add signature for .doc files.
2019-11-15 14:18:07 +01:00
Lars Ingebrigtsen
3495cefcf6 Avoid using subr-x function
* lisp/vc/vc-hg.el (vc-hg-retrieve-tag): Avoid using subr-x
function (bug#38216).
2019-11-15 10:05:39 +01:00
Martin Rudalics
fb3dea96b7 In 'dframe-frame-mode' avoid 'switch-to-buffer' (Bug#37840)
* lisp/dframe.el (dframe-frame-mode): Use 'set-window-buffer'
instead of 'switch-to-buffer’ to avoid that
'switch-to-buffer-obey-display-actions' butts in (Bug#37840).
2019-11-15 09:43:02 +01:00
Andrii Kolomoiets
3db1de0452 lisp/vc/vc-hg.el: Don't pass empty string to hg update
* lisp/vc/vc-hg.el (vc-hg-retrieve-tag): Don't pass empty name to
`hg update` (bug#38216).
2019-11-15 09:13:55 +01:00
Lele Gaifax
35ab18c03c Fix minor formatting issue in isearch-forward documentation
* lisp/isearch.el (isearch-forward): Doc string formatting fix
(bug#38207).
2019-11-15 09:10:24 +01:00
Lars Ingebrigtsen
ecc21845ea Make edebug-remove-instrumentation remove macro instrumentation
* lisp/emacs-lisp/edebug.el (edebug-remove-instrumentation):
Macros can also have edebug instrumentation, so remove that as
well (bug#38195).
2019-11-15 09:00:53 +01:00
Robert Pluim
06ac04a8ec Update nnir-method-default-engines version tag
* lisp/gnus/nnir.el (nnir-method-default-engines): Update version tag.
2019-11-15 08:56:37 +01:00
Stefan Monnier
6ea1e35f6f * lisp/cedet/semantic/db.el: Use lexical-binding
Also prefer setf over oset.
(semanticdb-abstract-table-list): Always define.
(semanticdb--inhibit-make-directory): Fix name of declaration to match
name of variable actually used.
(semanticdb-with-match-any-mode): Use `declare`.  Add Edebug spec.
(semanticdb-project-roots): Remove redundant :group.
2019-11-14 18:55:18 -05:00
Dmitry Gutov
6a2a371c28 (repos-count-screen-lines): Narrow without changing point-min
* lisp/reposition.el (repos-count-screen-lines): Narrow without
changing point-min.  It wasn't necessary for vertical-motion to
work, and it had some adverse effects on how font-lock rules were
applied
(https://lists.gnu.org/archive/html/emacs-devel/2019-11/msg00522.html).
This can also be an alternative fix for bug#38049.
2019-11-14 23:43:33 +02:00
Alan Mackenzie
c455e609bd CC Mode: Fix two bugs in the "state cache".
This (along with a suggestion to the OP to set
open-paren-in-column-0-is-defun-start to nil) fixes bug #37910.  It may also
have fixed bug #5490 and bug #18072.

* lisp/progmodes/cc-engine.el (c-state-cache-non-literal-place): Remove thi
non-sensical function, replacing it with ....
(c-state-cache-lower-good-pos): New function.
(c-renarrow-state-cache, c-append-lower-brace-pair-to-state-cache)
(c-remove-stale-state-cache, c-remove-stale-state-cache-backwards): Instead of
altering the state-cache list structure with setcar and setcdr, use setq and
consing.
(c-parse-state-1): Call c-state-cache-lower-good-pos rather than
c-state-cache-non-literal-place.
2019-11-14 19:51:01 +00:00
Phil Sainty
77c3bc0297 Make so-long disable flymake, flyspell, flycheck
* so-long.el (so-long-minor-modes): Add flymake-mode, flyspell-mode,
and flycheck-mode.
2019-11-15 00:39:13 +13:00
Phil Sainty
a94f961e62 Support loading so-long.el on top of an earlier version
* so-long.el (so-long-version, so-long--latest-version): New variables.

This enables users to safely load version 1.0 of so-long.el on top of
an earlier version, as well as making provisions for doing likewise
following any incompatible changes arising in future versions.
2019-11-15 00:39:13 +13:00
Phil Sainty
b28f35ac65 Backwards-compatibility function definitions for so-long.el
* so-long.el (so-long-inhibit-whitespace-mode)
(so-long-make-buffer-read-only, so-long-revert-buffer-read-only)
(so-long-inhibit-global-hl-line-mode): Restore dummy definitions of
now-obsolete hook functions used by earlier versions of so-long.el,
to support users who have saved these symbols in their customized
values for the hooks in question.
2019-11-15 00:39:13 +13:00
Phil Sainty
bf29fc46c8 * lisp/so-long.el (so-long-unload-function): Improved feature unload 2019-11-15 00:39:13 +13:00
Phil Sainty
cb7b63d6e2 ; * lisp/so-long.el (so-long-predicate): Custom type consistency
This is for consistency with the other function options, which all
used the 'radio' custom type.
2019-11-15 00:39:13 +13:00
Phil Sainty
e9dca2b5aa Defer triggering `so-long' until the buffer is displayed
* lisp/so-long.el (so-long-invisible-buffer-function): New user option.
(so-long--set-auto-mode): Use so-long-invisible-buffer-function.
(so-long-deferred): New function/value for so-long-invisible-buffer-function.
(so-long, so-long--disable): Support for so-long-deferred.

* test/lisp/so-long-tests/autoload-longlines-mode-tests.el
* test/lisp/so-long-tests/autoload-major-mode-tests.el
* test/lisp/so-long-tests/autoload-minor-mode-tests.el
* test/lisp/so-long-tests/so-long-tests.el:
Support for so-long-deferred.

Pre-existing tests have been updated to ensure the buffer is already
displayed in cases where a call to `normal-mode' is the (potential)
trigger for `so-long'.
2019-11-15 00:39:13 +13:00
Phil Sainty
90290745d7 ; Documentation and spelling
* lisp/so-long.el: Documentation fixes.  For the purposes of
consistency, this reverts some of the changes made in commit
41ba8231ef, including one which
had introduced inconsistent spelling.

ispell configuration and LocalWords have been added such that
`ispell-buffer' should find no misspellings for this library.

* test/lisp/so-long-tests/spelling-tests.el (so-long-spelling):
New test to check the spelling using `ispell-buffer'.
2019-11-15 00:39:12 +13:00
Katsumi Yamaoka
4f45e89852 Obsolete rfc2047-quote-special-characters-in-quoted-strings (bug#38200)
* lisp/mail/rfc2047.el
(rfc2047-quote-special-characters-in-quoted-strings): Make obsolete
instead of removing it.
2019-11-14 08:27:58 +00:00
Katsumi Yamaoka
7a1f401b83 Remove rfc2047-quote-special-characters-in-quoted-strings (bug#38200)
* lisp/mail/rfc2047.el
(rfc2047-quote-special-characters-in-quoted-strings): Remove function.
(rfc2047-encode-message-header, rfc2047-encode-region): Don't use it.
2019-11-14 08:05:05 +00:00
Andrii Kolomoiets
fd60824be9 (vc-default-update-on-retrieve-tag): Accept backend argument
* lisp/vc/vc.el (vc-default-update-on-retrieve-tag): Accept
backend argument (bug#38156).  This fixes a bug introduced in the
previous patch.
2019-11-14 08:18:22 +01:00
Lars Ingebrigtsen
900ace0dce Fix mouse-1 on Gnus article buffer buttons
* lisp/gnus/gnus-art.el (gnus-article-add-button): Make mouse-1
work as required by mouse-1-click-follows-link (bug#38144).
2019-11-14 07:48:41 +01:00
Andrii Kolomoiets
7afde23248 VC: ability to skip update buffers prompt
* lisp/vc/vc.el (vc-default-update-on-retrieve-tag): New function.
(vc-retrieve-tag): Call `update-on-retrieve-tag' backend function
to determine if prompt for update buffers is needed; Include tag
name into the "Retrieving tag" message.
* lisp/vc/vc-git.el (vc-git-update-on-retrieve-tag):
* lisp/vc/vc-hg.el (vc-hg-update-on-retrieve-tag):
* lisp/vc/vc-svn.el (vc-svn-udate-on-retrieve-tag): New functions.
Buffers update prompt on `vc-retrieve-tag' is omitted (bug#38156).
2019-11-14 06:55:28 +01:00
Braun Gábor
c9ede465de Make clone-buffer not unbind global variable
* lisp/simple.el (clone-buffer): Make clone-buffer not globally
unset locally void variable (bug#38179).

Copyright-paperwork-exempt: yes
2019-11-14 06:45:37 +01:00
Lars Ingebrigtsen
3591cb8dcc Make dired-do-compress-to require format-spec
* lisp/dired-aux.el (dired-do-compress-to): Require format-spec
runtime (bug#38189).
2019-11-14 06:31:50 +01:00
Lars Ingebrigtsen
d9ea77af4c Allow using edebug-remove-instrumentation more fine-grained
* lisp/emacs-lisp/edebug.el (edebug-remove-instrumentation):
Prompt the user for what functions to remove instrumentation from
a la cancel-edebug-on-entry (bug#38195).
2019-11-14 06:20:04 +01:00
Stephen Gildea
1d189843bb time-stamp: update support for time zone numeric offset
* time-stamp.el (time-stamp-string-preprocess): Change new format for
numeric time zone from %:z to %5z to match format-time-string better.
(time-stamp-format): Document support for numeric time zone.
See discussion in bug#32931.

* NEWS: Mention time-stamp-format %5z.
2019-11-13 21:11:28 -08:00
Katsumi Yamaoka
3ecbfefa72 Don't show Attachment(s) header in html article viewed with browse-url
* lisp/gnus/gnus-art.el (gnus-article-browse-html-article):
Bind gnus-mime-display-attachment-buttons-in-header to nil.
2019-11-14 02:24:26 +00:00
Juri Linkov
ea73c66423 * lisp/tab-line.el (tab-line-tabs-buffer-list): Use window-prev-buffers too.
* lisp/tab-line.el (tab-line-tabs-buffer-list): Move window-prev-buffers here
from tab-line-tabs-buffer-groups.
2019-11-14 00:09:06 +02:00
Michael Albinus
65fb04801c Finish last Tramp patch
* lisp/net/tramp.el (outline-regexp): Remove declaration.
(tramp-debug-outline-regexp): Add thread regexp.
(tramp-debug-font-lock-keywords): New defconst.
(tramp-debug-outline-level): Adapt to changed
`tramp-debug-outline-regexp'.
(tramp-get-debug-buffer): Use `tramp-debug-font-lock-keywords'.
2019-11-13 15:55:35 +01:00
Michael Albinus
3b88ab1a50 Some refinement in Tramp debug buffer.
* lisp/net/tramp.el (outline-regexp): Remove declaration.
(tramp-debug-font-lock-keywords): New defconst.
(tramp-get-debug-buffer): Use it.
2019-11-13 14:53:43 +01:00
Michael Albinus
d3438460ef Adapt Tramp docstrings according to checkdoc
* lisp/net/tramp.el (tramp-backup-directory-alist)
(tramp-echoed-echo-mark-regexp, tramp-syntax-values)
(tramp-lookup-syntax, tramp-build-prefix-format)
(tramp-build-prefix-regexp, tramp-build-method-regexp)
(tramp-build-postfix-method-format)
(tramp-build-postfix-method-regexp)
(tramp-build-prefix-ipv6-format, tramp-build-prefix-ipv6-regexp)
(tramp-build-postfix-ipv6-format)
(tramp-build-postfix-ipv6-regexp)
(tramp-build-postfix-host-format)
(tramp-build-postfix-host-regexp, tramp-unknown-id-string)
(tramp-unknown-id-integer, tramp-build-file-name-regexp)
(tramp-build-completion-file-name-regexp, tramp-chunksize)
(tramp-find-method, tramp-find-user, tramp-find-host)
(tramp-dissect-file-name, tramp-get-buffer)
(tramp-get-connection-buffer, tramp-debug-message, tramp-error)
(with-tramp-connection-property, tramp-run-real-handler)
(tramp-file-name-for-operation, tramp-file-name-handler)
(tramp-completion-file-name-handler)
(tramp-completion-handle-file-name-completion)
(tramp-completion-dissect-file-name)
(tramp-completion-dissect-file-name1)
(tramp-handle-file-name-as-directory)
(tramp-handle-file-name-directory)
(tramp-handle-file-name-nondirectory, tramp-mode-string-to-int)
(tramp-file-mode-from-int):
* lisp/net/tramp-adb.el (tramp-adb-file-name-p):
* lisp/net/tramp-archive.el (tramp-archive-run-real-handler)
(tramp-archive-file-name-handler)
(tramp-archive-dissect-file-name)
(with-parsed-tramp-archive-file-name)
(tramp-archive-gvfs-file-name, tramp-archive-handle-access-file):
* lisp/net/tramp-cmds.el (tramp-list-remote-buffers):
* lisp/net/tramp-compat.el (tramp-unload-file-name-handlers)
(tramp-compat-funcall, tramp-compat-tramp-file-name-slots):
* lisp/net/tramp-ftp.el (tramp-ftp-file-name-handler)
(tramp-ftp-file-name-p):
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-p)
(tramp-gvfs-file-name-handler)
(tramp-gvfs-stringify-dbus-message)
(tramp-gvfs-monitor-process-filter)
(tramp-gvfs-handler-mounted-unmounted):
* lisp/net/tramp-integration.el
(tramp-rfn-eshadow-update-overlay-regexp):
* lisp/net/tramp-rclone.el (tramp-rclone-file-name-p)
(tramp-rclone-file-name-handler, tramp-rclone-send-command):
* lisp/net/tramp-sh.el (tramp-sh--quoting-style-options)
(tramp-sh-gio-monitor-process-filter)
(tramp-sh-gvfs-monitor-dir-process-filter)
(tramp-sh-inotifywait-process-filter, tramp-find-executable)
(tramp-set-remote-path, tramp-open-shell, tramp-find-shell)
(tramp-send-command-and-check, tramp-shell-case-fold)
(tramp-get-remote-path):
* lisp/net/tramp-smb.el (tramp-smb-file-name-p)
(tramp-smb-file-name-handler)
(tramp-smb-do-file-attributes-with-stat)
(tramp-smb-handle-substitute-in-file-name)
(tramp-smb-get-stat-capability, tramp-smb-shell-quote-argument):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-p)
(tramp-sudoedit-file-name-handler)
(tramp-sudoedit-send-command-string):
* test/lisp/net/tramp-archive-tests.el (tramp-archive-test-all):
* test/lisp/net/tramp-tests.el (tramp--test-gvfs-p)
(tramp--test-with-proper-process-name-and-buffer)
(tramp-test-all): Adapt docstrings according to `checkdoc'.
2019-11-13 13:10:58 +01:00
João Távora
bf7debec3b Avoid fido-mode's setup on non-icomplete minibuffers
Otherwise we would lose things like C-r (isearch-backward) when doing
simple stuff like non-icomplete pp-eval-expression.

* lisp/icomplete.el (icomplete--fido-mode-setup): Restrict setup
to when icomplete-mode really kicks in.
2019-11-13 09:49:47 +00:00
Juri Linkov
0a492e4dfa * lisp/tab-line.el (tab-line-tabs-buffer-list-function): New variable.
(tab-line-tabs-buffer-list): New function.
(tab-line-tabs-mode-buffers, tab-line-tabs-buffer-groups):
Call tab-line-tabs-mode-buffers.
(tab-line-tabs-buffer-groups): Add 'close' function that uses
kill-buffer instead of bury-buffer that makes no sense here.
(tab-line-format): Don't show the close button when a tab
has no 'close' function or buffer.
(tab-line-switch-to-prev-tab, tab-line-switch-to-next-tab):
Support tabs with 'buffer' properties.
(tab-line-close-tab): Call 'close' function when defined.
2019-11-12 23:31:12 +02:00
Juri Linkov
d0351f4d20 * lisp/dired.el (dired-dwim-target): Add new choices (bug#35385)
* lisp/dired.el (dired-dwim-target): Add choices
dired-dwim-target-next and dired-dwim-target-recent.

* lisp/dired-aux.el (dired-dwim-target-next)
(dired-dwim-target-recent): New functions.
(dired-dwim-target-directories): Call either of them.

* doc/emacs/dired.texi (Operating on Files): Mention new
preferences in dired-dwim-target.
2019-11-12 23:21:14 +02:00
Stefan Monnier
6eaf62df20 * lisp/emacs-lisp/easymenu.el (easy-menu-make-symbol): Fix last change 2019-11-12 08:39:18 -05:00
Paul Eggert
555f5f78f8 Fix a few more minor quoting problems. 2019-11-11 22:54:41 -08:00
Lars Ingebrigtsen
c5fd4d373e 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.
2019-11-12 03:40:29 +01:00
Stefan Monnier
96828581d9 * lisp/startup.el (command-line): Fix last change in package--activated 2019-11-11 17:14:30 -05:00
Paul Eggert
6b4a97c1c7 Fix some quoting glitches in doc strings 2019-11-11 10:32:53 -08:00
Paul Eggert
269796288a 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’.
2019-11-11 10:32:52 -08:00
Paul Eggert
72729014fc 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.
2019-11-11 10:32:52 -08:00
Wilson Snyder
292f73fc72 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.
2019-11-11 11:47:54 -05:00
Stefan Kangas
d0a3c94996 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)
2019-11-11 16:05:21 +01:00
Paul Eggert
b6942c0c37 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.
2019-11-10 15:04:20 -08:00
Juri Linkov
6ad5eb9794 * 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.
2019-11-10 23:30:41 +02:00
Juri Linkov
7e151f5bcf * 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.
2019-11-10 23:21:46 +02:00
Stefan Kangas
0154e41b18 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>
2019-11-10 22:15:31 +01:00
Juri Linkov
f216f38870 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.
2019-11-10 23:06:37 +02:00
Stefan Monnier
b15a2fc348 * 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.
2019-11-09 23:57:37 -05:00
Jimmy Aguilar Mena
e3043a73fb Add extra bindings to fido-mode.
* lisp/icomplete.el (icomplete-fido-mode-map) : Add arrows and other
bindings to reproduce ido behaviour.
2019-11-10 04:48:23 +01:00
Juri Linkov
732e942798 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.
2019-11-10 00:51:25 +02:00
Juri Linkov
8693611136 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.
2019-11-10 00:46:29 +02:00
Juri Linkov
8d68025baf 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.
2019-11-10 00:43:09 +02:00
Stefan Monnier
d370c6a686 * lisp/startup.el (package--activated): Fix redundant definition 2019-11-09 17:42:36 -05:00
Stefan Monnier
8685db187b * 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).
2019-11-09 17:34:45 -05:00
Juri Linkov
027f218ad2 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.
2019-11-10 00:32:09 +02:00
Juri Linkov
04ab674707 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.
2019-11-10 00:21:26 +02:00
Juri Linkov
a26a8cc1c8 '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.
2019-11-10 00:04:13 +02:00
Juri Linkov
898cdc67f1 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.
2019-11-09 23:32:46 +02:00
Karl Fogel
06cb8350c6 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.
2019-11-09 15:30:09 -05:00
Lars Ingebrigtsen
a67b51e92b Fix font-lock-keywords slightly
* lisp/font-lock.el (font-lock-keywords): Tweak doc string
slightly (bug#35005).
2019-11-09 21:02:24 +01:00
Eli Zaretskii
a1a724d73a 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)
2019-11-09 21:40:53 +02:00
Glenn Morris
e73184138d * lisp/progmodes/cc-vars.el (c-mark-wrong-style-of-comment):
Fix version.
2019-11-09 11:17:20 -08:00
João Távora
afe4969a3b 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 5761a1a393.
2019-11-09 14:55:42 +00:00
João Távora
5c74b806a6 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.
2019-11-09 14:55:42 +00:00
João Távora
d9c6b4378a 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.
2019-11-09 14:55:42 +00:00
Alan Mackenzie
7362554eaf 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.
2019-11-09 14:37:55 +00:00
Alan Mackenzie
b293aa91bc 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.
2019-11-09 12:09:30 +00:00
Eli Zaretskii
4e4440272e 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)
2019-11-09 11:43:19 +02:00
Hong Xu
15f4c4156c 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)
2019-11-09 11:36:35 +02:00
Paul Eggert
f8284f1e40 Fix some quoting glitches in doc strings
This also fixes a misplaced "only".
2019-11-08 17:11:01 -08:00
Stefan Monnier
b7f843adfd * lisp/ffap.el (ffap-read-file-or-url): Fix some URL cases 2019-11-08 13:59:23 -05:00
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
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
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
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
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
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
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
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
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
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
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
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
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
Juri Linkov
58fde6362f * lisp/help-fns.el (describe-variable): Add quotes to symbol value of origval. 2019-11-03 23:52:23 +02:00
Juri Linkov
da087965f2 * 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.
2019-11-03 23:48:53 +02:00
Juri Linkov
c472df8ad3 * 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.
2019-11-03 23:44:44 +02:00
Stefan Kangas
84a3793b19 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>
2019-11-03 17:45:48 +01:00
Lars Ingebrigtsen
5c8375bd68 describe-font/font-info works with unloaded fonts
* lisp/international/mule-diag.el (describe-font): This function
can be used on unloaded fonts, so remove that restriction from the
doc string (bug#16815).  Also allow completion over all fonts on
the system.

* src/font.c (Ffont_info): Ditto for the doc string.
2019-11-03 16:33:15 +01:00
Lars Ingebrigtsen
ba8a7882de Add a <a id=...> skeleton to html-mode
* lisp/textmodes/sgml-mode.el (html-id-anchor): New skeleton
and keystroke (bug#37651).
2019-11-03 16:06:35 +01:00
Juanma Barranquero
e323a84c9f * lisp/bs.el (bs-mode): Improve mode docstring. 2019-11-03 14:15:18 +01:00
Juri Linkov
0b9dc0a8fe * lisp/tab-line.el (tab-line-tab-selected): New face.
(tab-line-format): Use new face tab-line-tab-selected.
([tab-line]): Move tab-switching mouse wheel commands to S-keys.
2019-11-02 23:39:15 +02:00
João Távora
adb5f45d7b Allow flymake diagnostic types to have shorter names
Eglot, a third-party package which uses Flymake, has its own
diagnostic types such as 'eglot-error', 'eglot-warning', etc...  While
not being too long, they will not fit in the type column of the "list
all diagnostics" buffer.  This commit allows diagnostic types to have
user-defined names and also assigns names to the default categories.

* doc/misc/flymake.texi (Flymake error types): Describe
flymake-type-name prop.

* lisp/progmodes/flymake.el (flymake--diagnostics-buffer-entries):
Use type names.
(flymake-error, flymake-warning, flymake-note): Give these
diagnostic categories default type names.
2019-11-02 16:38:53 +00:00
João Távora
455e753a2b Avoid face clashes between Flymake and region highlighting
Fix bug#34022.

* lisp/progmodes/flymake.el (flymake--highlight-line): Use
(PRIMARY . SECONDARY) priority value.
2019-11-02 16:16:14 +00:00
João Távora
b32c4d7bac Clarify consequences of mismatching Flymake diagnostic buffers
Fix bug#34418.

* doc/misc/flymake.texi (Flymake utility functions): Add note to
flymake-make-diagnostic.

* lisp/progmodes/flymake.el (flymake--handle-report): Discard
diagnostics from other buffers.
2019-11-02 15:56:19 +00:00
Lars Ingebrigtsen
c2e77ff89a Revert "Make the debbugs groups also include robot messages"
This reverts commit 682eae776e.

The change made the bug# disappear from the Subject lines.
2019-11-02 15:37:14 +01:00
Alan Mackenzie
ec16dd1a1e CC Mode. Fix slow scrolling by adding a search limit.
This fixes bug #10149.

* lisp/progmodes/cc-fonts.el (c-font-lock-single-decl) Limit the search by
c-go-up-list-backwards to 500 non-literal characters.
2019-11-02 13:03:50 +00:00
João Távora
6911ef3da6 Correct merge blunder in last icomplete commit
* lisp/icomplete.el (icomplete-exhibit): Use
while-no-input-ignore-events.
2019-11-02 11:10:04 +00:00
Eli Zaretskii
cacd58463b Improve documentation of 'set-face-font'
* lisp/faces.el (set-face-font):
* doc/emacs/frames.texi (Fonts):
* doc/lispref/display.texi (Face Attributes)
(Attribute Functions): Clarify and correct the documentation
of set-face-font and related descriptions of font
specifications.  (Bug#14647)
2019-11-02 12:41:51 +02:00
Stefan Kangas
6c82aafcc0 Add auto-insert skeleton for ".dir-locals.el"
* lisp/autoinsert.el (auto-insert-alist): Add auto-insert skeleton for
".dir-locals.el".
2019-11-02 04:23:24 +01:00
João Távora
730e7da7ba New icomplete-tidy-shadowed-file-names variable
* lisp/icomplete.el (rfn-eshadow): Require it.
(icomplete-tidy-shadowed-file-names): New variable.
(icomplete-exhibit): Use icomplete-tidy-shadowed-file-names.
2019-11-02 02:38:45 +00:00
João Távora
0bb97ad8b8 Fix icomplete-force-complete-and-exit for no-input situations
If there is no minibuffer input, but the user has already cycled some
pre-calculated completions, we should be calling
minibuffer-force-complete-and-exit instead of
minibuffer-complete-and-exit.  The former is guaranteed to be fast in
this situation and yields the desired "selected" completion, while the
latter will just give us the default, ignoring all the cycling of
icomplete-{forward|backward}-completions.

* lisp/icomplete.el (icomplete-force-complete-and-exit): Add
comments and fix for empty input but some completions calculated.
2019-11-02 02:35:45 +00:00
João Távora
88f193ed05 Improve fix for icomplete's backward-kill-word bug#38024
* lisp/icomplete.el (icomplete-exhibit): Use
while-no-input-ignore-events, not redisplay.

Co-authored-by: Stefan Monnier <j.schmoe@example.org>
2019-11-02 02:35:45 +00:00
Stefan Kangas
6b2745fe2e Use PASSWORD_STORE_DIR in auth-source-pass when set
* lisp/auth-source-pass.el (auth-source-pass-filename): Initialize to
PASSWORD_STORE_DIR environment variable when set.  (Bug#29663)
2019-11-02 01:33:40 +01:00
Stefan Kangas
6297eb0fca Don't refuse to install packages without a "footer line"
* lisp/emacs-lisp/package.el (package-buffer-info): Don't signal an
error when the "footer line" is missing.  Warn only.  (Bug#26490)
* etc/NEWS: Announce it.
2019-11-02 01:30:36 +01:00
Lars Ingebrigtsen
a8b8744665 set-face-font doc string update
* lisp/faces.el (set-face-font): Mention what the string formats
are (bug#14647).
2019-11-01 18:32:29 +01:00
Lars Ingebrigtsen
0714d6664c Really enable setting a breakpoint without instrumenting first
* lisp/emacs-lisp/edebug.el (edebug-set-breakpoint): Really enable
setting a breakpoint without instrumenting first (bug#23469).
2019-11-01 17:42:28 +01:00
Glenn Morris
64a1541175 ; Auto-commit of loaddefs files. 2019-11-01 06:27:08 -07:00
Filipp Gunbin
0bffb3e69d Make ant regexp in compilation-error-regexp-alist-alist more lax
* lisp/progmodes/compile.el: Make ant regexp accept filenames that may
occur on Cygwin (like c:/test) and optional additional severity level
after task name.
* etc/compilation.txt: Add sample.
2019-11-01 15:20:42 +03:00
Eric Ludlam
9d209c9034 * lisp/cedet/ (semantic-analyze-possible-completions): Add flags arg
* lisp/cedet/semantic/texi.el (semantic-analyze-possible-completions),
lisp/cedet/srecode/srt-mode.el (semantic-analyze-possible-completions),
lisp/cedet/semantic/bovine/make.el (semantic-analyze-possible-completions):
Add `flags` arg.
* lisp/cedet/semantic/grammar.el (semantic-analyze-possible-completions):
Add `flags` arg.  Reverse the found prefix.
(semantic-ctxt-current-class-list): Include token tags as things to
appear in non-lisp context.
2019-10-31 19:10:58 -04:00
Mattias Engdegård
d75794fd5c Inhibit undo-in-region for mouse-drag-region (bug#37700)
'mouse-drag-region' leaves the region active around the dragged text,
so a straight undo did not revert the entire operation.  To remedy
this, inhibit undo-in-region when the last command was
mouse-drag-region.  (Method suggested by Stefan Monnier.)

* lisp/mouse.el (undo-drag-region): Set the undo-inhibit-region property.
* lisp/simple.el (undo): Inhibit undo-in-region if the last command
had the undo-inhibit-region property set.
* doc/lispref/symbols.texi (Standard Properties):
* doc/lispref/text.texi (Undo): Document undo-inhibit-region.
* etc/NEWS: Announce the property.
2019-10-31 17:41:29 +01:00
Lars Ingebrigtsen
111a95fe6d Ensure that font-local variables are buffer-local
* lisp/font-lock.el (font-lock-set-defaults): Ensure that the font
lock variables are buffer-local even when nil, so that they're
copied correctly by mhtml mode when changing sub-modes (bug#33937).
2019-10-31 14:06:08 +01:00
Lars Ingebrigtsen
60ad3d63cf Clean up font-lock-refontify slightly
* lisp/font-lock.el (font-lock-refontify): Use
syntax-ppss-flush-cache instead of internal variable.
2019-10-31 13:26:19 +01:00
Lars Ingebrigtsen
d630a047bb Further tweaks to sh-script \ #foo font locking
* lisp/progmodes/sh-script.el (sh-syntax-propertize-function):
Tweak previous \ #foo change to work on all quoted characters, but
check that the backslash itself is not backslashed.  Regexp from
Stefan Monnier.
2019-10-31 13:07:37 +01:00
Michael Albinus
bdb33af39d Fix some minor Tramp problems
* lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
Check, that `tramp-password-save-function' is a function.

* lisp/net/tramp-smb.el (tramp-smb-handle-file-system-info):
Check, that there is a share.

* lisp/net/tramp.el (outline-regexp): Declare.
(tramp-get-debug-buffer): Let-bind `signal-hook-function'.

* test/lisp/net/tramp-tests.el (tramp-test04-substitute-in-file-name):
Skip some tests for Emacs 24 and 25; they let Emacs crash.
2019-10-31 11:13:13 +01:00
Robert Pluim
e168bb7386 Rework vc stash bindings
This adds create/snapshot bindings to the stash button even when there
are no stashes, and extends the stash menu bindings.

* etc/NEWS: Announce the bindings.

* lisp/vc/vc-git.el (vc-git-stash-shared-map): New keymap.  Holds
shared bindings between stash button and stash list.
(vc-git-stash-map): Inherit from vc-git-stash-shared-map.
(vc-git-stash-button-map): New keymap.  Holds button bindings,
inherit from vc-git-stash-shared-map.
(vc-git-stash-shared-help, vc-git-stash-list-help): New
defconsts.  Abstract out list/button help texts.
(vc-git--make-button-text): Set keymap property to
vc-git-stash-button-map.
(vc-git-make-stash-button): Use vc-git-stash-shared-help.
(vc-git-stash-menu-map): Add items for vc-git-stash and
vc-git-stash-snapshot.
(vc-git-dir-extra-headers): Use vc-git-stash-list-help and
vc-git-stash-shared-help.  Add vc-git-stash and
vc-git-stash-snapshot bindings to text shown when there are no stashes.
2019-10-31 10:53:05 +01:00
Lars Ingebrigtsen
48fdfd8b93 Font-lock symlinks in dired buffers better
* lisp/dired.el (dired-font-lock-keywords): Font-lock symlinks
differently based on whether they point at a directory or not
(bug#17064).  Based on code from Michael Heerdegen.
2019-10-31 00:31:32 +01:00
Juri Linkov
390dd2cff9 * lisp/tab-bar.el (tab-bar-select-tab): Use set-frame-parameter.
(tab-bar-list-noselect, tab-bar-list-mode): Rearrange buffer-read-only.
2019-10-31 01:11:05 +02:00
Kevin Ryde
94b8153eaa Support \pagebreak[0] for paragraph-separate in latex-mode
* textmodes/tex-mode.el (latex-mode): In 'paragraph-separate' allow
optional argument ('[0]', etc.) for '\pagebreak[0]'.  (Bug#19039)
2019-10-30 22:35:19 +01:00
Tom Tromey
772f1c4189 Send -enable-frame-filters to gdb
* lisp/progmodes/gdb-mi.el (gdb-init-1): Send -enable-frame-filters to
gdb.
2019-10-30 22:25:23 +01:00
Lars Ingebrigtsen
f9ffb81fb8 Fix previous sh-script.el font-lock #comment change
* lisp/progmodes/sh-script.el (sh-syntax-propertize-function): We
want to match "\ " before a comment; not a space character.
2019-10-30 22:06:18 +01:00
Lars Ingebrigtsen
77d4491391 Revert "Move description of value to syntax-ppss function."
This reverts commit 305dbc7e2b.

Both of the functions in question are used a lot in the sources, so move it back to the more basic function.
2019-10-30 21:26:22 +01:00
Lars Ingebrigtsen
f7673c147c Add a new ppss structure for syntax-ppss data
* lisp/emacs-lisp/syntax.el (ppss): Add a new structure to provide
accessors to the syntax-ppss data.
2019-10-30 21:25:23 +01:00
Lars Ingebrigtsen
b21ea56edc Tweak fontification of \url{http://foo.org/bar%zot} in (la)tex-mode
* lisp/textmodes/tex-mode.el (tex-font-lock-keywords-1):
\url{http://foo.org/bar%zot} shouldn't be fontified as having a
comment, so make the tex-verbatim face overwrite the
already-applied syntactical comment bits (bug#37134).
2019-10-30 21:06:47 +01:00
Lars Ingebrigtsen
4650aa3523 Bind vc-git-stash to a key
* lisp/vc/vc-git.el (vc-git-stash-map): Give `vc-git-stash' a
keystroke, because it's a useful command.

When there are no stashes, there's no way to use that keystroke (since
it's only bound on the stash lines), so perhaps that should also be
fixed somehow.
2019-10-30 20:54:44 +01:00
Lars Ingebrigtsen
f8134d2753 Clear more data in font-lock-refontify to ensure refontifying
* lisp/font-lock.el (font-lock-refontify): Clear out even more data.
2019-10-30 15:39:44 +01:00
Lars Ingebrigtsen
b996117fe5 font-lock \ #foo in shell mode more correctly
* lisp/progmodes/sh-script.el (sh-syntax-propertize-function):
\ #foo isn't a comment -- it's a symbol that starts with a space
character (bug#17538).
2019-10-30 15:39:15 +01:00
Lars Ingebrigtsen
9df254119c Make font-lock-refontify try even harder to refontify
* lisp/font-lock.el (font-lock-refontify): Make this command work
even after switching global font lock mode on and then off again.
2019-10-30 15:04:17 +01:00
Lars Ingebrigtsen
1fc8bf71d9 Fix setgid fontification in dired on some OS-es
* lisp/dired.el (dired-font-lock-keywords): Apparently some
versions of ls use "S" for setgid and other use "s" (bug#8186).
2019-10-30 13:30:47 +01:00
Lars Ingebrigtsen
66efb2f3a6 Fix "dnl" highlights in m4-mode
* lisp/progmodes/m4-mode.el (m4-font-lock-keywords): "dnl"
comments should override any previous syntax-based highlighting
(37132).  This makes "dnl foo#bar" be highlighted correctly.
2019-10-30 13:16:44 +01:00
Lars Ingebrigtsen
e1409379f7 Add a convenience function to be used when working on font locking
* doc/lispref/modes.texi (Font Lock Basics): Document it.

* lisp/font-lock.el (font-lock-refontify): New convenience command.
2019-10-30 13:16:44 +01:00
Lars Ingebrigtsen
305dbc7e2b Move description of value to syntax-ppss function.
* lisp/emacs-lisp/syntax.el (syntax-ppss): Move the description of
the return value from...

* src/syntax.c (Fparse_partial_sexp): ... here because
`syntax-ppss' is what's called over the place, and jumping through
an indirection to get to the value description is inconvenient.
2019-10-30 13:16:44 +01:00
Lars Ingebrigtsen
40c787ff4e Indent font-lock-fontify-syntactically-region
* lisp/font-lock.el (font-lock-fontify-syntactically-region):
Indent function.
2019-10-30 13:16:43 +01:00
Michael Albinus
fc05708248 * lisp/net/tramp.el (outline-regexp): Remove declaration. 2019-10-30 09:44:24 +01:00
Lars Ingebrigtsen
7ce00e9a8b Fix image-converter probes
* lisp/image/image-converter.el (image-converter--probe): Check
that the executable exists before trying to call it.
2019-10-30 01:02:48 +01:00
Juri Linkov
ba7755bfb7 Rename read-char-with-history to read-char-from-minibuffer (bug#10477)
* lisp/simple.el (read-char-from-minibuffer-history):
Rename from read-char-with-history--history.
(read-char-from-minibuffer-map):
Rename from read-char-with-history--map.
(read-char-from-minibuffer): Rename from read-char-with-history.
(read-char-from-minibuffer-self-insert): New command.
(zap-to-char): Use read-char-from-minibuffer.
2019-10-30 02:00:02 +02:00
Lars Ingebrigtsen
682eae776e Make the debbugs groups also include robot messages
* lisp/gnus/gnus-group.el (gnus-bug-group-download-format-alist):
Change the URL to also include robot messages.
2019-10-30 00:17:57 +01:00
Juri Linkov
bafcef87c3 Reimplement read-char-with-history based on read-from-minibuffer
* lisp/simple.el (read-char-with-history): Reimplement based on
read-from-minibuffer.
* lisp/simple.el (read-char-with-history--map): New variable
(bug#10477).
2019-10-30 00:01:11 +01:00
Juri Linkov
d7f62ce0cd * lisp/tab-bar.el: Store point position and frame buffer-lists in tab.
* lisp/tab-bar.el (tab-bar--tab): Store additionally point-marker,
frame parameters buffer-list and buried-buffer-list, both for wc and ws.
Use seq-filter.
(tab-bar-select-tab): Restore point-marker after restoring
window-configuration.  Also restore frame parameters buffer-list
and buried-buffer-list both for window-configuration and window-state.
(tab-bar-history-limit, tab-bar-history--minibuffer-depth): New variables.
(tab-bar-history-current): Rename from tab-bar-history--pre-change.
(tab-bar-history--pre-change): Set tab-bar-history-current.
(tab-bar--history-change): Use seq-take for tab-bar-history-limit.
(tab-bar-history-back, tab-bar-history-forward): Restore point-marker.
(tab-bar-list-noselect): Use seq-remove.

* lisp/emacs-lisp/seq.el (seq-take, seq-filter): Add autoload cookie.
2019-10-30 00:31:11 +02:00
Lars Ingebrigtsen
d3517de4b4 Make url-cookie.el be more resistant against bogus data
* lisp/url/url-cookie.el (url-cookie-handle-set-cookie): Don't bug
out on large max-age values (bug#37974).
2019-10-29 22:53:00 +01:00
Lars Ingebrigtsen
19c98f7620 Default exotic image formats (like .webp) to image-mode
* doc/lispref/errors.texi (Standard Errors): Mention the new error.

* lisp/files.el (auto-mode-alist): Add a bunch of image suffixes
to the list (bug#37972) based on the output from "gm convert -list
format" (i.e., graphicsmagick).

* lisp/image-mode.el (image-mode): Rewrite to possibly notify the
user about image-use-external-converter.
(image-mode--setup-mode): Factor out into own function and don't
run under `condition-case' as there's nothing here that should
error.

* lisp/image.el (unknown-image-type): New error.
(image-type): Signal that error so that image-mode can offer
sensible feedback to the user.
2019-10-29 21:42:39 +01:00
Lars Ingebrigtsen
1997e3b80f Fix image-converter probing
* lisp/image/image-converter.el (image-converter--find-converter):
Stop probing on the first successful probe.
2019-10-29 21:42:39 +01:00
Stefan Monnier
7208c4f8c9 * lisp/minibuffer.el: Tweak and undo parts of recent changes
(completion-metadata): Always return a fresh new cons cell.
(completion--nth-completion): Don't bother calling adjust-metadata
if the result won't be used.
(completion-pcm--hilit-commonality): Revert recent change which had
removed support for `completions-first-difference` in `substring` and
`partial-completion` styles.
(completion--flex-adjust-metadata): Treat the arg as immutable.
2019-10-29 16:17:14 -04:00
Filipp Gunbin
6d2c73e8c7 Add gradle-kotlin to compilation-error-regexp-alist-alist
* lisp/progmodes/compile.el: Add gradle-kotlin to
compilation-error-regexp-alist-alist.
* etc/compilation.txt: Add samples for it.
2019-10-29 23:06:20 +03:00
Lars Ingebrigtsen
0956a65e6f Make shr scale images on all frames
* lisp/net/shr.el (shr-rescale-image): Rescale images even if the
window isn't on the current frame.
2019-10-29 13:56:49 +01:00
João Távora
5860fd3123 Make icomplete-exhibit actually work when navigating up directories
Sometimes, when finding files with icomplete-mode, backward-deleting
the previous word or sexp (to move up a directory) doesn't actually
refresh the file list of the new directory.  Forcing redisplay in
icomplete-exhibit misteriously fixes the problem.

* lisp/icomplete.el (icomplete-exhibit): Add call to redisplay.
2019-10-29 00:19:33 +00:00
João Távora
7373d6eae8 New commands for making icomplete behave more like ido
This tries (not particularly hard) to emulate Ido's magic C-k, C-d,
RET and DEL.  For now, the new commands have to be explicitly added to
an active map by the user, using something like this:

(let ((imap icomplete-minibuffer-map))
  (define-key imap (kbd "C-k") 'icomplete-magic-ido-kill)
  (define-key imap (kbd "C-d") 'icomplete-magic-ido-delete-char)
  (define-key imap (kbd "RET") 'icomplete-magic-ido-ret)
  (define-key imap (kbd "DEL") 'icomplete-magic-ido-backward-updir))

* lisp/icomplete.el (icomplete-magic-ido-kill)
(icomplete-magic-ido-delete-char, icomplete-magic-ido-ret)
(icomplete-magic-ido-backward-updir): New commands.
2019-10-29 00:19:33 +00:00
Juri Linkov
4e3676726a * lisp/tab-bar.el: Check for minibuffer-depth in tab-bar-history-mode.
* lisp/tab-bar.el (tab-bar-history--pre-change): Store also minibuffer-depth.
(tab-bar-history-change): Check stored minibuffer-depth for zero.
(tab-bar-history-mode): Use prefix -- for internal functions.
2019-10-28 23:55:16 +02:00
Mattias Engdegård
2aed0430c7 Use new-style rx extensions in python.el
* lisp/progmodes/python.el (python-rx): Use `rx-let' instead of
`rx-constituents'.  This allows for some slight redundancy reduction,
since `rx-let' definitions are expanded inside `not' (bug#37849).
Reorder some `or' forms for more efficient matching.
2019-10-28 17:38:33 +01:00
Hong Xu
70578e0777 Add doc for goto-history-element
* doc/lispref/minibuf.texi (Minibuffer Commands): Add
goto-history-element (bug#37948).
* lisp/simple.el (goto-history-element): Clarify NABS.
2019-10-28 16:20:52 +01:00
Stefan Kangas
9ee2caac4d * lisp/eshell/em-term.el: Remove commented out XEmacs compat code. 2019-10-28 16:17:41 +01:00
Stefan Kangas
1f1ce5b311 Remove more XEmacs compat code from CEDET
* lisp/cedet/mode-local.el (mode-local-describe-bindings-1):
* lisp/cedet/semantic/idle.el (semantic-idle-summary-out-of-context-faces):
* lisp/cedet/semantic/imenu.el (semantic-imenu-rebuild-directory-indexes):
* lisp/cedet/semantic/texi.el (semantic-texi-command-completion-list):
Remove XEmacs compat code.
2019-10-28 16:07:10 +01:00
Stefan Kangas
c515d4eeb2 Remove obsolete doc references to XEmacs (Bug#37899)
* doc/misc/edt.texi (Changes, Goals):
* doc/misc/emacs-mime.texi (Charset Translation):
* doc/misc/gnus-faq.texi (FAQ 4-15):
* doc/misc/pcl-cvs.texi (Bugs):
* doc/misc/srecode.texi (SRecode Minor Mode):
* lisp/cedet/srecode/insert.el (srecode-insert-ask-variable-method):
* lisp/follow.el:
* lisp/leim/quail/ipa.el (ipa-x-sampa, ipa-kirshenbaum):
* lisp/net/newsticker.el:
* lisp/obsolete/iswitchb.el:
* lisp/progmodes/hideshow.el:
* lisp/savehist.el (savehist-file):
* lisp/vc/ediff.el: Remove obsolete references to XEmacs in doc
strings and comments.
2019-10-28 15:55:10 +01:00
Michal Nowak
97cfb4f1e7 Add cert bundle path for OpenIndiana
* lisp/net/gnutls.el (gnutls-trustfiles): Add cert bundle path for
OpenIndiana (bug#37960).

Copyright-paperwork-exempt: yes
2019-10-28 15:38:34 +01:00
Lars Ingebrigtsen
925872ee7b Make ERC respect erc-channel-hide-list
* lisp/erc/erc.el (erc-hide-current-message-p): Make
erc-channel-hide-list work (bug#37879) by getting matching on the
channel name instead of the ERC client name.
2019-10-28 15:31:39 +01:00
Lars Ingebrigtsen
4367c296ce Fix `G c' in Gnus group buffers for non-ASCII text
* lisp/gnus/gnus-cus.el (gnus-group-customize): Decoding is
superfluous here -- everything is utf-8 already.
(gnus-group-customize-done): Don't double-encode the text (bug#37901).
2019-10-28 15:10:51 +01:00
Lars Ingebrigtsen
2864c5201d Be more permissive when interpreting IMAP mail headers
* lisp/gnus/nnimap.el (nnimap-transform-headers): Some mail
doesn't have space after the colon of the header name.  Don't
ignore these.
2019-10-28 13:31:37 +01:00
Lars Ingebrigtsen
3478f2f3d6 Make <up> work in read-char-with-history
* lisp/simple.el (read-char-with-history): Tweak to make
<up>/<down> also traverse the history (bug#10477).
2019-10-28 12:12:00 +01:00
Koichi Arakawa
098873b4f2 Reorder command-line switches in Tramp
* lisp/net/tramp-sh.el (tramp-maybe-open-connection):
`tramp-encoding-command-interactive' must be the last command-line
switch, at least for bash.  (Bug#37953)

Copyright-paperwork-exempt: yes
2019-10-28 09:49:59 +01:00
Juri Linkov
7e30076225 * lisp/tab-bar.el: Add tab-bar-history-mode with arrow buttons for navigation.
* lisp/tab-bar.el (tab-bar-back-button, tab-bar-forward-button):
New variables.
(tab-bar-make-keymap-1): Show these buttons in tab-bar-history-mode.
(tab-bar--tab): Add history-back and history-forward.
(tab-bar-select-tab): Restore history-back and history-forward.
(tab-bar-history-omit, tab-bar-history-back)
(tab-bar-history-forward, tab-bar-history-pre-change): New variables.
(tab-bar-history-pre-change, tab-bar-history-change)
(tab-bar-history-back, tab-bar-history-forward)
(tab-bar-history-mode): New functions.
2019-10-28 01:04:47 +02:00
Stefan Monnier
0e4dd67aae * lisp/emacs-lisp/seq.el: Don't require cl-lib.
(seq-subseq): Move cl-subseq's code here instyead of calling it.
* lisp/emacs-lisp/cl-extra.el (cl-subseq): Use seq-subseq.
2019-10-27 13:25:00 -04:00
Stefan Monnier
2aaced1686 * lisp/loadup.el: Load minibuffer after cl-generic
This is so minibuffer.el can make use of cl-generic

* lisp/minibuffer.el (minibuffer-local-completion-map):
Move switch-to-completions bindings here from...
* lisp/simple.el (minibuffer-local-completion-map): ... here.
2019-10-27 13:21:21 -04:00
Stephen Gildea
113ff954db time-stamp-time-zone: update customization
* time-stamp.el (time-stamp-time-zone): Support customization with
an integer offset (a new possible value of the ZONE argument to
format-time-string in Emacs 27).
Update the safe-local-variable predicate from string-or-null-p
(describing time-stamp-time-zone's domain before 2015) to new
predicate time-stamp-zone-type-p (describing the current domain).

* time-stamp-tests.el (time-stamp-test-helper-zone-type-p): New test.
2019-10-27 08:21:16 -07:00
Eli Zaretskii
fc0f98a8a8 Fix point position after revert-buffer in tabulated-list mode
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-print):
Don't use count-screen-lines, as it is unreliable when lines
are truncated and the region ends before a newline (the root
cause is in vertical-motion, but is very hard to fix there).
Instead, use vertical-motion directly, as the problems with
counting/not counting the newline that ends the region are not
relevant to what we need in this function, which is simply the
number of the current window line.  (Bug#37941)
2019-10-27 17:07:47 +02:00
João Távora
1b687e171e Optimize lisp/icomplete.el when default completion available
Often, when using icomplete with icomplete-show-matches-on-no-input
and commands like C-h f, icomplete-exhibit will take a long time (like
several seconds) to show all the completions.

However, if there is a non-nil default value, like when the C-h f is
performed exactly on a function name, the minibuffer prompt will
reflect that immediately.  If the user immediately presses RE
(icomplete-force-complete-and-exit) we take that to mean "use the
default" and avoid the long wait.

As an extra performance tweak, this commit also removes an unneeded
call to icomplete-exhibit in icomplete-minibuffer-setup.

* lisp/icomplete.el (icomplete-force-complete-and-exit): Short-circuit
possibility of non-nil minibuffer-default.
(icomplete-minibuffer-setup): No need to explicitly icomplete-exhibit
here since icomplete-post-command-hook will call it unconditionally.
2019-10-27 13:21:22 +00:00
Mattias Engdegård
cbd439e785 Expand rx definitions inside (not ...)
* lisp/emacs-lisp/rx.el (rx--translate-not):
* test/lisp/emacs-lisp/rx-tests.el (rx-not, rx-def-in-not):
* doc/lispref/searching.texi (Rx Constructs, Extending Rx):

Allow user-defined rx constructs to be expanded inside (not ...)
forms, for better composability (bug#37849).
2019-10-27 09:54:54 +01:00
Michael Albinus
6e66d9a95c Some Tramp trace improvements
* lisp/net/tramp.el (tramp-call-process): `result' can also be nil.

* test/lisp/net/tramp-tests.el (tramp--test-timeout-handler):
Improve trace format.
2019-10-27 09:36:56 +01:00