]> git.eshelyaron.com Git - emacs.git/log
emacs.git
5 years ago* lisp/tab-bar.el: Check for minibuffer-depth in tab-bar-history-mode.
Juri Linkov [Mon, 28 Oct 2019 21:55:16 +0000 (23:55 +0200)]
* 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.

5 years agoUse new-style rx extensions in python.el
Mattias Engdegård [Sun, 27 Oct 2019 20:39:58 +0000 (21:39 +0100)]
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.

5 years ago; Fix recent change in docs
Eli Zaretskii [Mon, 28 Oct 2019 15:52:16 +0000 (17:52 +0200)]
; Fix recent change in docs

* doc/lispref/minibuf.texi (Minibuffer Commands): Fix wording
and markup.  (Bug#37948)

5 years agoAdd doc for goto-history-element
Hong Xu [Mon, 28 Oct 2019 15:20:43 +0000 (16:20 +0100)]
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.

5 years ago* lisp/eshell/em-term.el: Remove commented out XEmacs compat code.
Stefan Kangas [Mon, 28 Oct 2019 15:13:28 +0000 (16:13 +0100)]
* lisp/eshell/em-term.el: Remove commented out XEmacs compat code.

5 years agoRemove more XEmacs compat code from CEDET
Stefan Kangas [Mon, 28 Oct 2019 15:05:39 +0000 (16:05 +0100)]
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.

5 years agoRemove obsolete doc references to XEmacs (Bug#37899)
Stefan Kangas [Mon, 28 Oct 2019 14:55:10 +0000 (15:55 +0100)]
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.

5 years agoAdd cert bundle path for OpenIndiana
Michal Nowak [Mon, 28 Oct 2019 14:38:34 +0000 (15:38 +0100)]
Add cert bundle path for OpenIndiana

* lisp/net/gnutls.el (gnutls-trustfiles): Add cert bundle path for
OpenIndiana (bug#37960).

Copyright-paperwork-exempt: yes

5 years agoMake ERC respect erc-channel-hide-list
Lars Ingebrigtsen [Mon, 28 Oct 2019 14:31:39 +0000 (15:31 +0100)]
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.

5 years agoFix `G c' in Gnus group buffers for non-ASCII text
Lars Ingebrigtsen [Mon, 28 Oct 2019 14:10:51 +0000 (15:10 +0100)]
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).

5 years agoBe more permissive when interpreting IMAP mail headers
Lars Ingebrigtsen [Mon, 28 Oct 2019 12:31:37 +0000 (13:31 +0100)]
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.

5 years agoMake <up> work in read-char-with-history
Lars Ingebrigtsen [Mon, 28 Oct 2019 11:11:46 +0000 (12:11 +0100)]
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).

5 years agoReorder command-line switches in Tramp
Koichi Arakawa [Mon, 28 Oct 2019 08:49:59 +0000 (09:49 +0100)]
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

5 years ago* lisp/tab-bar.el: Add tab-bar-history-mode with arrow buttons for navigation.
Juri Linkov [Sun, 27 Oct 2019 23:04:47 +0000 (01:04 +0200)]
* 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.

5 years ago* test/lisp/cedet/semantic-utest: silence compiler warnings
Eric Ludlam [Sun, 27 Oct 2019 21:02:59 +0000 (17:02 -0400)]
* test/lisp/cedet/semantic-utest: silence compiler warnings

* test/lisp/cedet/semantic-utest-c.el
(semantic-test-c-preprocessor-simulation): Use with-current-buffer.

* test/lisp/cedet/semantic-utest.el (semantic-utest-makebuffer):
Use read-only-mode.
(semantic-utest-verify-names-jave, semantic-utest-verify-names-2):
Remove functions, unused.

5 years ago* .gitignore: Don't ignore .rej files
Stefan Monnier [Sun, 27 Oct 2019 21:00:55 +0000 (17:00 -0400)]
* .gitignore: Don't ignore .rej files

Left over rejected hunks that we forgot to merge by hand should not be
silently ignored.  Better explicitly remove/rename .rej files when
done with them.

5 years ago* lisp/emacs-lisp/seq.el: Don't require cl-lib.
Stefan Monnier [Sun, 27 Oct 2019 17:25:00 +0000 (13:25 -0400)]
* 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.

5 years ago* lisp/loadup.el: Load minibuffer after cl-generic
Stefan Monnier [Sun, 27 Oct 2019 17:21:21 +0000 (13:21 -0400)]
* 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.

5 years agotime-stamp-time-zone: update customization
Stephen Gildea [Sun, 27 Oct 2019 15:20:13 +0000 (08:20 -0700)]
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.

5 years agoFix point position after revert-buffer in tabulated-list mode
Eli Zaretskii [Sun, 27 Oct 2019 15:07:47 +0000 (17:07 +0200)]
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)

5 years agoOptimize lisp/icomplete.el when default completion available
João Távora [Sun, 27 Oct 2019 13:20:56 +0000 (13:20 +0000)]
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.

5 years agoExpand rx definitions inside (not ...)
Mattias Engdegård [Sun, 27 Oct 2019 08:54:54 +0000 (09:54 +0100)]
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).

5 years agoSome Tramp trace improvements
Michael Albinus [Sun, 27 Oct 2019 08:36:56 +0000 (09:36 +0100)]
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.

5 years agoImprove scoring algorithm for flex-style completions
João Távora [Sun, 27 Oct 2019 00:33:54 +0000 (01:33 +0100)]
Improve scoring algorithm for flex-style completions

The previous algorithm had two problems: it considered non-matches in
the beginning and end of the string as matching "holes" and failed to
penalize larger holes, making flex-score-match-tightness only
effective in some corner cases.

The new formula, which is described in code and in pseudo-code in the
comments, fixes these problems.

As a result, by default, C-h f flex now correctly bubbles up
"company-search-flex-regexp" to the top, in front of "file-exists-p".
With a flex-score-match-tightness smaller than 1.0, the situation is
reversed.

* lisp/minibuffer.el (flex-score-match-tightness): Adjust default
value.  Improve docstring example.
(completion-pcm--hilit-commonality): Improve example.  Remove unused
variable.  Improve algorithm.

5 years agominibuffer.el: Remove leftover code, unused after recent change
Juanma Barranquero [Sun, 27 Oct 2019 00:31:50 +0000 (02:31 +0200)]
minibuffer.el: Remove leftover code, unused after recent change

* lisp/minibuffer.el (completion-pcm--hilit-commonality):
Don't set point-idx.

5 years agodired-dwim-target uses most recently visited window instead of next window.
Juri Linkov [Sat, 26 Oct 2019 23:20:15 +0000 (02:20 +0300)]
dired-dwim-target uses most recently visited window instead of next window.

* doc/emacs/dired.texi (Operating on Files): Document behavior change.

* lisp/dired-aux.el (dired-dwim-target-directories): New function.
(dired-dwim-target-directory, dired-dwim-target-defaults): Use it
to get the most recently used window instead of the next window (bug#35385).

* lisp/dired.el (dired-dwim-target): Doc fix.

* test/lisp/dired-tests.el: Remove unnecessary require and pacify
byte-compiler.

5 years agoCustomizable tab-line-tabs-function and new buffer-local tab-line-mode.
Juri Linkov [Sat, 26 Oct 2019 22:38:32 +0000 (01:38 +0300)]
Customizable tab-line-tabs-function and new buffer-local tab-line-mode.

* lisp/tab-line.el (tab-line-tabs-function): Turn defvar into defcustom
with default of tab-line-tabs-window-buffers.
(tab-line-tabs-mode-buffers): New function.
(tab-line-tabs-window-buffers): Rename from tab-line-tabs.
(tab-line-select-tab, tab-line-switch-to-prev-tab)
(tab-line-switch-to-next-tab): Handle the value tab-line-tabs-window-buffers
of tab-line-tabs-function specially.
(tab-line-mode): Rename from global-tab-line-mode and change scope
to buffer-local.
(global-tab-line-mode): New globalized-minor-mode.
(tab-line-mode--turn-on): New function.
(tab-line-exclude-modes): New defcustom.
(tab-line-exclude): New buffer-local variable.
https://lists.gnu.org/archive/html/emacs-devel/2019-10/msg00988.html

* lisp/dired.el (dired-mark-pop-up): Set tab-line-exclude to nil.
Don't set tab-line-format.   (Bug#37699)
* lisp/speedbar.el (speedbar-mode): Set tab-line-exclude to nil.
Don't set tab-line-format.

5 years ago* lisp/tab-bar.el (tab-bar-switch-to-recent-tab): New command.
Juri Linkov [Sat, 26 Oct 2019 22:16:10 +0000 (01:16 +0300)]
* lisp/tab-bar.el (tab-bar-switch-to-recent-tab): New command.

(tab-recent): Alias to tab-bar-switch-to-recent-tab.
(tab-bar--tab-index-recent): New internal function.
(tab-bar-close-tab-select): Add new default option 'recent'.
(tab-bar-close-tab): Handle it.

* lisp/emacs-lisp/seq.el (seq-sort-by, seq-remove): Add autoload.

5 years ago* lisp/tab-bar.el (tab-bar-move-tab-to): Add force-mode-line-update.
Juri Linkov [Sat, 26 Oct 2019 21:57:04 +0000 (00:57 +0300)]
* lisp/tab-bar.el (tab-bar-move-tab-to): Add force-mode-line-update.

(tab-bar-close-last-tab-choice, tab-bar-close-tab): Adjust option names.

5 years agoAdd customization option for what do when the last tab is closed
Robert Cochran [Thu, 24 Oct 2019 00:34:24 +0000 (17:34 -0700)]
Add customization option for what do when the last tab is closed

* lisp/tab-bar.el (tab-bar-close-last-tab-choice): New custom
variable.
(tab-bar-close-tab): Handle closing the last tab specially, referring to
tab-bar-close-last-tab-choice.

5 years agotime-stamp-tests: add name prefix to tests of formatting
Stephen Gildea [Sat, 26 Oct 2019 21:31:22 +0000 (14:31 -0700)]
time-stamp-tests: add name prefix to tests of formatting

* time-stamp-tests.el: rename all the time-stamp-string formatting tests
to have the word "format" in their name, to make room in the namespace
for other, future tests.

5 years agoRestore default value of face completions-common-part
João Távora [Sat, 26 Oct 2019 20:47:36 +0000 (21:47 +0100)]
Restore default value of face completions-common-part

The previous commit titled "Rework face hints for partial-string
completion styles" contained a potentially controversial
backwards-incompatible change to this face's default value.

* lisp/minibuffer.el (completions-common-part): Restore empty
default value.

5 years agoImprove support for biblatex and cleveref macros
Arash Esbati [Sat, 26 Oct 2019 11:29:14 +0000 (13:29 +0200)]
Improve support for biblatex and cleveref macros

* lisp/textmodes/reftex-cite.el (reftex-figure-out-cite-format):
Extend regexp to match additional cite commands from biblatex.sty.

* lisp/textmodes/reftex-dcr.el (reftex-view-crossref): Extend
regexp to match additional cite commands from biblatex.sty and
reference commands from cleveref.sty.

5 years agoAvoid infloop's by doing a case-sensitive match
Arash Esbati [Sat, 26 Oct 2019 11:25:19 +0000 (13:25 +0200)]
Avoid infloop's by doing a case-sensitive match

* lisp/textmodes/reftex-ref.el (reftex-format-special): Be
case-sensitive when checking the actual reference macro against
\ref.  This avoids infloop when \Ref is chosen.

5 years ago; * etc/NEWS: Fix entry about map.el's 'type' argument. (Bug#37936)
Eli Zaretskii [Sat, 26 Oct 2019 18:25:46 +0000 (21:25 +0300)]
; * etc/NEWS: Fix entry about map.el's 'type' argument.  (Bug#37936)

5 years agoMerge from origin/emacs-26
Glenn Morris [Sat, 26 Oct 2019 16:55:12 +0000 (09:55 -0700)]
Merge from origin/emacs-26

55dcd32 (origin/emacs-26) Fix rcirc not to interpret nil as nickname ...

5 years ago; Merge from origin/emacs-26
Glenn Morris [Sat, 26 Oct 2019 16:55:12 +0000 (09:55 -0700)]
; Merge from origin/emacs-26

The following commit was skipped:

bd0f173 Fix trig simplification crash (bug#33052)

5 years agoMerge from origin/emacs-26
Glenn Morris [Sat, 26 Oct 2019 16:55:12 +0000 (09:55 -0700)]
Merge from origin/emacs-26

73e1727 Fix linear equation system solving in Calc (bug#35374)

# Conflicts:
# test/lisp/calc/calc-tests.el

5 years ago; Merge from origin/emacs-26
Glenn Morris [Sat, 26 Oct 2019 16:53:42 +0000 (09:53 -0700)]
; Merge from origin/emacs-26

The following commit was skipped:

bba9757 Backport: Fix an assignment to free variable warning

5 years agoRework face hints for partial-string completion styles
João Távora [Sat, 26 Oct 2019 13:31:38 +0000 (14:31 +0100)]
Rework face hints for partial-string completion styles

Don't use completions-first-difference for the 'substring', 'flex' and
'partial-completion' styles, since there can be really no reasonable
definition of a "first" difference there.

Make completions-common-part inherit from 'underline' so that it is
useful by default for all completion styles.

* lisp/minibuffer.el (completions-common-part): Adjust
description and change default value.
(completions-first-difference): Ajust docstring.
(completion-pcm--hilit-commonality): Don't use
completions-first-difference.

5 years agoAllow completion styles to adjust completion metadata
João Távora [Sat, 26 Oct 2019 13:13:08 +0000 (14:13 +0100)]
Allow completion styles to adjust completion metadata

This commit re-does the now-reverted commit with the same title.  That
version relied on generic functions, which cannot be used yet in files
such as lisp/minibuffer.el.  This version uses a symbol property
completion--adjust-metadata instead.

The new facility allows completion styles to have a say in metadata
properties such as cycle-sort-function and display-sort-function.
This is especially useful for completion styles such as 'flex', which
generally produce many matches, including some potentially "obscure"
ones.  The default sorting strategy would often bubble the latter to
the top of the list.

The sorting function for 'flex' considers pre-computed matching scores
and is thus much better than the default for this particular style.

Additionally, it overrides the completion table's cycle-sort-function
or display-sort-function properties if they exist, although it still
uses them to pre-sort the result, so that they are still relevant for
resolving ties.

* lisp/minibuffer.el (completion--nth-completion)
(completion--flex-adjust-metadata): New helper.
(flex): Put completion--adjust-metadata property.

5 years agoRevert "Allow completion styles to adjust completion metadata"
João Távora [Sat, 26 Oct 2019 12:45:14 +0000 (13:45 +0100)]
Revert "Allow completion styles to adjust completion metadata"

Unbreaks the build.

This reverts commit 7fc0292f5c49d11fc39853f8bc25586d54221e6a.

Unfortunately, cl-defgeneric has some problems when used in
lisp/minibuffer.el.

5 years agosubr.el (run-window-configuration-change-hook): Mark obsolete
Stefan Monnier [Sat, 26 Oct 2019 12:17:09 +0000 (08:17 -0400)]
subr.el (run-window-configuration-change-hook): Mark obsolete

5 years agoAllow completion styles to adjust completion metadata
João Távora [Fri, 25 Oct 2019 22:57:44 +0000 (23:57 +0100)]
Allow completion styles to adjust completion metadata

The new facility, realized in the completion-adjust-metadata-for-style
generic, allows completion styles to have a say in metadata properties
such as cycle-sort-function and display-sort-function.  This is
especially useful for completion styles such as 'flex', which
generally produce many matches, including some potentially "obscure"
ones.  The default sorting strategy would often bubble the latter
to the top of the list.

The sorting function for 'flex' considers pre-computed matching scores
and is thus much better than the default for this particular style.

Additionally, it overrides the completion table's cycle-sort-function
or display-sort-function properties if they exist, although it still
uses them to pre-sort the result, so that they are still relevant for
resolving ties.

* lisp/minibuffer.el (completion--nth-completion): Call
completion-adjust-metadata-for-style.
(completion-adjust-metadata-for-style): New generic.
(completion-adjust-metadata-for-style 'flex): New method.

5 years agoReplay key if kboard is interrupted while initializing (Bug#37782)
memeplex [Sat, 19 Oct 2019 03:13:15 +0000 (00:13 -0300)]
Replay key if kboard is interrupted while initializing (Bug#37782)

The problem with the original fix for bug#5095 is that it drops
the current event, which is a valid character event and not -2.
Thus, the first ESC character sent by the terminal after turning
on focus tracking is lost and we get '[' and 'I' events separately
inserted into the buffer afterwards.

* src/keyboard.c (read_key_sequence): Add key as mock_input and replay
sequence using new keyboard, when the key is not -2.

5 years agoRemove redundant initialization of fringe bitmap (Bug#37756)
memeplex [Wed, 16 Oct 2019 16:44:00 +0000 (13:44 -0300)]
Remove redundant initialization of fringe bitmap (Bug#37756)

* src/fringe.c (Fdefine-fringe-bitmap): Remove redundant zeroing
of fb.bits that only zeroed half of the array anyway.

5 years agoImprove the documentation of 'vc-tor'
Eli Zaretskii [Sat, 26 Oct 2019 09:57:09 +0000 (12:57 +0300)]
Improve the documentation of 'vc-tor'

* lisp/vc/vc-dispatcher.el (vc-tor): Add :version.  Enhance
the doc string.

* etc/NEWS: Announce the new option.

5 years agoNew defcustom 'vc-tor'
Richard Stallman [Mon, 14 Oct 2019 01:42:53 +0000 (21:42 -0400)]
New defcustom 'vc-tor'

* lisp/vc/vc-dispatcher.el (vc-tor): New user option.
(vc-do-command): If vc-tor is non-nil, use 'torsocks'.

5 years agoAdapt doc-view to latest image-mode changes
Tassilo Horn [Fri, 25 Oct 2019 20:07:39 +0000 (22:07 +0200)]
Adapt doc-view to latest image-mode changes

The functions image-scroll-down, image-scroll-up, image-next-line, and
image-previous-line now return pixel values instead of multiples of
character height as of commit 9c66b09950.

* lisp/doc-view.el (doc-view-scroll-up-or-next-page):
(doc-view-scroll-down-or-previous-page):
(doc-view-next-line-or-next-page):
(doc-view-previous-line-or-previous-page):
(doc-view-insert-image): Adapt to image-scroll-up/down and
image-next/previous-line now returning pixel values instead of
multiples of character heights.  Fixes bug#37874.

5 years agoCC Mode: Fix positioning of point whilst inserting comments without non-ws
Alan Mackenzie [Fri, 25 Oct 2019 20:11:48 +0000 (20:11 +0000)]
CC Mode: Fix positioning of point whilst inserting comments without non-ws

* lisp/progmodes/cc-cmds.el (c-guess-fill-prefix): When determining a new
block comment prefix (i.e. there isn't one already there to copy), and that
prefix is hard up against a comment closer, ensure there are at least two
spaces before the closer.
(c-indent-new-comment-line): Amend the strategy for ensuring that point isn't
left hard up against the comment closer after M-j.

5 years agotime-stamp-tests: consistently name the time vars
Stephen Gildea [Fri, 25 Oct 2019 15:44:15 +0000 (08:44 -0700)]
time-stamp-tests: consistently name the time vars

* time-stamp-tests.el (with-time-stamp-test-env): rename local variable
'ref-time' to 'ref-time1', for parallelism with ref-time2 and ref-time3.

5 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Michael Albinus [Fri, 25 Oct 2019 14:52:14 +0000 (16:52 +0200)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

5 years agoMention completion styles for Tramp user/host name completion
Michael Albinus [Fri, 25 Oct 2019 14:45:48 +0000 (16:45 +0200)]
Mention completion styles for Tramp user/host name completion

* doc/misc/tramp.texi (File name completion): Emacs must have one
of the completion styles `basic', `emacs21', or `emacs22'.

5 years agowindmove.el: Suppress warnings for obsolete functions
Juanma Barranquero [Fri, 25 Oct 2019 14:39:54 +0000 (16:39 +0200)]
windmove.el: Suppress warnings for obsolete functions

* lisp/windmove.el (windmove-constrain-loc-for-movement)
(windmove-wrap-loc-for-movement, windmove-reference-loc)
(windmove-other-window-loc): Wrap calls to obsolete functions
in `with-suppressed-warnings'.

5 years agowindmove.el: Mark unused code as obsolete
Juanma Barranquero [Fri, 25 Oct 2019 13:42:13 +0000 (15:42 +0200)]
windmove.el: Mark unused code as obsolete

* lisp/windmove.el (windmove-window-distance-delta)
(windmove-coord-add, windmove-constrain-to-range)
(windmove-constrain-around-range, windmove-frame-edges)
(windmove-constrain-loc-for-movement)
(windmove-wrap-loc-for-movement, windmove-reference-loc)
(windmove-other-window-loc): Declare obsolete.
(windmove-find-other-window, windmove-do-window-select):
Doc fixes.

* etc/NEWS: Document it.

5 years ago* lisp/windmove.el (windmove-frame-edges): Simplify.
Juanma Barranquero [Fri, 25 Oct 2019 12:23:07 +0000 (14:23 +0200)]
* lisp/windmove.el (windmove-frame-edges): Simplify.

5 years agoFix gnus-thread-hide-subtree defcustom
Lars Ingebrigtsen [Fri, 25 Oct 2019 10:41:29 +0000 (12:41 +0200)]
Fix gnus-thread-hide-subtree defcustom

* lisp/gnus/gnus-sum.el (gnus-thread-hide-subtree): Make the
"Non-nil" predicate do what it's supposed to (i.e., return non-nil
on non-nil values (excepting predicates)) (bug#37916).

5 years ago* lisp/cedet/mode-local.el: Clean up name space
Stefan Monnier [Fri, 25 Oct 2019 03:06:23 +0000 (23:06 -0400)]
* lisp/cedet/mode-local.el: Clean up name space

Mostly renaming functions by adding `mode-local--` to their name
and leaving an obsolete alias behind, just in case.

(define-child-mode): Make obsolete.
(mode-local--set-parent): Rename from set-mode-local-parent.
(mode-local--new-bindings): Rename from new-mode-local-bindings.
Use `obarray-make`.
(mode-local--activate-bindings): Rename from activate-mode-local-bindings.
(mode-local--deactivate-bindings): Rename from
deactivate-mode-local-bindings.
(make-obsolete-overload): Rename properties with a `mode-local--` prefix.
Adjust all users.
(mode-local--overload-obsoleted-by): Rename from overload-obsoleted-by.
(mode-local--overload-that-obsolete): Rename from overload-that-obsolete.
(mode-local--function-overload-p): Rename from function-overload-p.
(mode-local-read-function): Mark obsolete.
(mode-local--overload-docstring-extension): Rename from
overload-docstring-extension.
(mode-local--describe-overload): Rename from describe-mode-local-overload.

* lisp/cedet/semantic/fw.el (semantic-install-function-overrides):
Remove unused `mode` argument.

* lisp/cedet/semantic/grammar-wy.el (semantic-grammar-wy--install-parser):
* lisp/cedet/semantic/bovine/grammar.el (bovine-grammar-mode):
* lisp/cedet/semantic/texi.el (semantic-default-texi-setup):
* lisp/cedet/semantic/wisent/grammar.el (wisent-grammar-setupcode-builder)
(wisent-grammar-mode):
* lisp/cedet/semantic/html.el (semantic-default-html-setup):
Make the `semantic-` prefix explicit to ease grep search.
(html-helper-mode): Remove obsolete setting.

* lisp/cedet/semantic/wisent/javascript.el: Fix js-mode/javascript-mode
mixup so we don't need define-child-mode any more.
(semantic-get-local-variables, semantic-ctxt-current-symbol)
(semantic-tag-protection, semantic-analyze-scope-calculate-access):
Use `js-mode` rather than `javascript-mode` as the mode name since
that's the real mode's name.

* lisp/cedet/semantic/wisent/python.el (python-2-mode, python-3-mode):
Remove child declaration for non-existing modes.

* lisp/cedet/srecode/map.el (srecode-map-validate-file-for-mode): Simplify.

5 years agoUpdate from Gnulib
Paul Eggert [Thu, 24 Oct 2019 21:32:06 +0000 (14:32 -0700)]
Update from Gnulib

This incorporates:
2019-10-23 nstrftime: speed up integer overflow checking
2019-10-23 port better to GCC under macOS
2019-10-15 inttypes: use more-robust test for int range
2019-10-14 update-copyright: use en dashes in .texi ranges
* build-aux/update-copyright, lib/intprops.h, lib/inttypes.in.h:
* lib/nstrftime.c, lib/verify.h:
Copy from Gnulib.

5 years ago* doc/lispref/display.texi: Document `delay-warning'
Juanma Barranquero [Thu, 24 Oct 2019 19:16:43 +0000 (21:16 +0200)]
* doc/lispref/display.texi: Document `delay-warning'

5 years agorx.el: Refactor user-definition expansion
Mattias Engdegård [Tue, 22 Oct 2019 15:02:23 +0000 (17:02 +0200)]
rx.el: Refactor user-definition expansion

* lisp/emacs-lisp/rx.el (rx--translate-not): Simplify structure.
* lisp/emacs-lisp/rx.el (rx--expand-def): New.
(rx--translate-symbol, rx--translate-form): Use rx--expand-def.

5 years agoUpdate FAQ section on large files (Bug#37818)
Stefan Kangas [Wed, 23 Oct 2019 23:08:30 +0000 (01:08 +0200)]
Update FAQ section on large files (Bug#37818)

* doc/misc/efaq.texi (Problems with very large files): Extend section
and remove information about ancient versions of Emacs.

5 years agoUpdate FAQ section on Emacs security (Bug#37818)
Stefan Kangas [Wed, 23 Oct 2019 23:08:20 +0000 (01:08 +0200)]
Update FAQ section on Emacs security (Bug#37818)

* doc/misc/efaq.texi (Security risks with Emacs): Remove section on
movemail.  Add section on third-party packages.

5 years ago* lisp/cedet/mode-local.el: Use lexical-binding and `declare`
Stefan Monnier [Wed, 23 Oct 2019 21:48:41 +0000 (17:48 -0400)]
* lisp/cedet/mode-local.el: Use lexical-binding and `declare`

(with-mode-local-symbol, with-mode-local, setq-mode-local)
(defvar-mode-local, defconst-mode-local)
(define-overloadable-function, define-mode-local-override):
Use `declare` for indent and edebug specs.
(xref-mode-local-find-overloadable-regexp): Simplify regexp.
(mode-local-setup-edebug-specs): Delete.
(edebug-setup-hook): Don't use any more.

5 years ago* lisp/dired.el (dired-mark-pop-up): Set tab-line-format to nil (bug#37699).
Juri Linkov [Wed, 23 Oct 2019 21:34:07 +0000 (00:34 +0300)]
* lisp/dired.el (dired-mark-pop-up): Set tab-line-format to nil (bug#37699).

5 years ago* lisp/tab-bar.el: Allow to specify interactively where to add a new tab.
Juri Linkov [Wed, 23 Oct 2019 20:58:30 +0000 (23:58 +0300)]
* lisp/tab-bar.el: Allow to specify interactively where to add a new tab.

* lisp/tab-bar.el (tab-bar-new-tab-to): Rename from tab-bar-new-tab.
Add optional arg TO-INDEX.
(tab-bar-new-tab): New implementation to use relative ARG.
(tab-new-to): Alias to tab-bar-new-tab-to.

5 years ago* lisp/tab-bar.el: Rename tab-bar-swap-tabs to tab-bar-move-tab-to.
Juri Linkov [Wed, 23 Oct 2019 20:53:08 +0000 (23:53 +0300)]
* lisp/tab-bar.el: Rename tab-bar-swap-tabs to tab-bar-move-tab-to.

* lisp/tab-bar.el (tab-bar-move-tab-to): Rename from tab-bar-swap-tabs.
Change logic to push the moved tab between existing tabs.
(tab-bar-move-tab): Call tab-bar-move-tab-to instead of tab-bar-swap-tabs.
(tab-move-to): Rename alias from tab-swap.

5 years agoImplement tab close undo feature for tab-bar.
Juri Linkov [Wed, 23 Oct 2019 20:39:31 +0000 (23:39 +0300)]
Implement tab close undo feature for tab-bar.

* lisp/tab-bar.el (tab-bar-closed-tabs): New variable.
(tab-bar-close-tab): Add closed tab to tab-bar-closed-tabs.
Disable tab-bar-mode on closing the last tab.
(tab-bar-close-other-tabs): Add all closed tabs to tab-bar-closed-tabs.
(tab-bar-undo-close-tab): New command.
(tab-undo): Alias to tab-bar-undo-close-tab.

5 years ago* lisp/cedet/semantic/analyze/complete.el: Fix completion-at-point
Stefan Monnier [Wed, 23 Oct 2019 20:15:41 +0000 (16:15 -0400)]
* lisp/cedet/semantic/analyze/complete.el: Fix completion-at-point

Completion tables are not supposed to signal errors:

    emacs -q
    M-x semantic-mode
    ; visit a file supported by semantic, such as a C file
    ; put cursor in a blank space
    M-x completion-at-point
    It will error with: "Nothing to complete"

(semantic-analyze-possible-completions): Return nil instead of
signaling errors.

5 years agoEnsure that the prompt is kept on the final line
Lars Ingebrigtsen [Wed, 23 Oct 2019 09:55:13 +0000 (11:55 +0200)]
Ensure that the prompt is kept on the final line

* lisp/erc/erc-goodies.el (erc-possibly-scroll-to-bottom): New
function.
(scrolltobottom): Add to erc-insert-done-hook.

* lisp/erc/erc.el (erc-insert-done-hook): New hook (bug#11697).
(erc-display-line-1): Use it.

5 years agoMake erc-cmd-CLEAR do what its doc string says
Lars Ingebrigtsen [Wed, 23 Oct 2019 09:13:54 +0000 (11:13 +0200)]
Make erc-cmd-CLEAR do what its doc string says

* lisp/erc/erc.el (erc-cmd-CLEAR): Delete the buffer contents
instead of recentering (bug#31743).

5 years agoMake display of S/MIME signatures slightly better
Lars Ingebrigtsen [Wed, 23 Oct 2019 08:50:29 +0000 (10:50 +0200)]
Make display of S/MIME signatures slightly better

* lisp/epg.el (epg-signature-to-string): Decode percent escapes
(bug#36101).

5 years agoMake Gnus recognise "git am" diffs in all groups
Lars Ingebrigtsen [Wed, 23 Oct 2019 08:34:28 +0000 (10:34 +0200)]
Make Gnus recognise "git am" diffs in all groups

* lisp/gnus/mm-uu.el (mm-uu-diff-groups-regexp): Recognise diffs
in all groups (bug#32730).

5 years agoAdd version tag to gnutls-min-prime-bits
Stefan Kangas [Wed, 23 Oct 2019 00:26:34 +0000 (02:26 +0200)]
Add version tag to gnutls-min-prime-bits

* lisp/net/gnutls.el (gnutls-min-prime-bits): Add version tag.

5 years agoAvoid extra lines in python-shell font lock buffer (Bug#33959)
memeplex [Tue, 15 Oct 2019 00:37:20 +0000 (21:37 -0300)]
Avoid extra lines in python-shell font lock buffer (Bug#33959)

* lisp/progmodes/python.el
(python-shell-font-lock-comint-output-filter-function): Avoid writing
a newline to the font lock buffer when receiving an empty string.

5 years agoSet expected result for a cedet test
Glenn Morris [Tue, 22 Oct 2019 23:25:21 +0000 (16:25 -0700)]
Set expected result for a cedet test

* test/lisp/cedet/srecode-utest-template.el (srecode-utest-project):
Test fails on hydra.nixos.org, for some reason.

5 years agoTab-line horizontal scrolling with UI buttons and commands (bug#37667)
Juri Linkov [Tue, 22 Oct 2019 21:17:27 +0000 (00:17 +0300)]
Tab-line horizontal scrolling with UI buttons and commands (bug#37667)

* etc/images/tabs/left-arrow.xpm:
* etc/images/tabs/right-arrow.xpm: New images.

* lisp/tab-line.el (tab-line-left-map, tab-line-right-map): New keymaps.
(tab-line-left-button, tab-line-right-button): New variables.
(tab-line-tab-name-function): Turn defvar into defcustom.
(tab-line-tab-name-buffer): New function.
(tab-line-tab-name-truncated-buffer): Rename from tab-line-tab-name.
(tab-line-tabs-limit): Default to nil.
(tab-line-tabs): Behavior depends on tab-line-tabs-limit.
(tab-line-format): Use window-parameter tab-line-hscroll.
Add left/right buttons.
(tab-line-hscroll): New function.
(tab-line-hscroll-right, tab-line-hscroll-left): New commands
bound to mouse-wheel.  Rebind tab-switching commands to mouse-wheel
with Ctrl-modifier.

5 years agoFix "make bootstrap" build warning in tab-bar.el
Lars Ingebrigtsen [Tue, 22 Oct 2019 19:18:33 +0000 (21:18 +0200)]
Fix "make bootstrap" build warning in tab-bar.el

* lisp/tab-bar.el (require): Require seq when compiling to avoid a
compilation warning.  The function it uses is autoloaded, but
autoloads aren't loaded when this is built (on "make bootstrap").

5 years agoFix recent changes in documentation
Eli Zaretskii [Tue, 22 Oct 2019 16:28:58 +0000 (19:28 +0300)]
Fix recent changes in documentation

* doc/lispref/edebug.texi (Edebug Eval, Eval List): Reword
recently added text to follow conventions.

* src/textprop.c (Ftext_properties_at): Don't use passive tense
in doc string.

5 years agoVarious doc fixes for auto-insert-mode
Stefan Kangas [Tue, 22 Oct 2019 16:02:43 +0000 (18:02 +0200)]
Various doc fixes for auto-insert-mode

* doc/misc/autotype.texi (Autoinserting): Various doc fixes.
* lisp/autoinsert.el (top-level): Recommend 'auto-insert-mode' over
'add-hook'.

5 years agoMake text-properties-at mention describe-text-properties
Lars Ingebrigtsen [Tue, 22 Oct 2019 14:54:50 +0000 (16:54 +0200)]
Make text-properties-at mention describe-text-properties

* src/textprop.c (Ftext_properties_at): Mention
describe-text-properties in the doc string.

5 years agoAdd a fringe example
Lars Ingebrigtsen [Tue, 22 Oct 2019 14:21:00 +0000 (16:21 +0200)]
Add a fringe example

* doc/lispref/display.texi (Fringe Bitmaps): Add an example.

5 years agorx doc string tweaks
Mattias Engdegård [Tue, 22 Oct 2019 13:35:40 +0000 (15:35 +0200)]
rx doc string tweaks

* lisp/emacs-lisp/rx.el (rx--translate-seq, rx--translate-or, rx):
Say "zero or more" instead of "one or more" where applicable.

5 years agoMake edebug-eval-last-sexp interactively take a zero prefix
Lars Ingebrigtsen [Tue, 22 Oct 2019 11:12:03 +0000 (13:12 +0200)]
Make edebug-eval-last-sexp interactively take a zero prefix

* lisp/emacs-lisp/edebug.el (edebug-eval-last-sexp): Make the zero
prefix work analogously to in eval-last-sexp (bug#28895).
(edebug-eval-print-last-sexp): Ditto.

5 years agoShow stash counts in button in vc-dir
Robert Pluim [Tue, 22 Oct 2019 07:31:15 +0000 (09:31 +0200)]
Show stash counts in button in vc-dir

Based on suggestions from Mattias Engdegård.

* lisp/vc/vc-git.el (vc-git--make-button-text): New function to
generate text for stash button.
(vc-git-make-stash-button): Show stash counts.  Delete and recreate
button when toggling.
(vc-git-dir-extra-headers): Pass counts to vc-git-make-stash-button.
Treat stash count <= vc-git-show-stash as equivalent to showing entire
list.

5 years agoMove entry for \Ref into LaTeX core
Arash Esbati [Sun, 20 Oct 2019 18:27:00 +0000 (20:27 +0200)]
Move entry for \Ref into LaTeX core

* lisp/textmodes/reftex-vars.el (reftex-ref-style-alist): Move
entry for \Ref from "Varioref" into "Default" as this macro is
part of LaTeX 2019-10-01 kernel.
Rearrange entries for "Varioref".

5 years ago* etc/NEWS: Improve documentation of 'package-initialize'.
Stefan Kangas [Tue, 22 Oct 2019 02:05:35 +0000 (04:05 +0200)]
* etc/NEWS: Improve documentation of 'package-initialize'.

5 years agoPortcheck only if --enable-gcc-warnings
Paul Eggert [Tue, 22 Oct 2019 00:28:02 +0000 (17:28 -0700)]
Portcheck only if --enable-gcc-warnings

Problem reported by Richard Copley (Bug#37852).
This patch causes the problem to not occur if one uses plain
‘configure’.  The problem can still occur if with ‘configure
--enable-gcc-warnings’, so a further fix may be needed.
* configure.ac (GNULIB_PORTCHECK, _FORTIFY_SOURCE):
Define these only with an explicit --enable-gcc-warnings.

5 years agoRemove XEmacs compat code from speedbar.el
Stefan Kangas [Mon, 21 Oct 2019 22:38:21 +0000 (00:38 +0200)]
Remove XEmacs compat code from speedbar.el

* lisp/speedbar.el (speedbar-frame-plist, speedbar-frame-mode)
(speedbar-make-overlay, speedbar-overlay-put, speedbar-delete-overlay)
(speedbar-mode-line-update, speedbar-frame-reposition-smartly)
(speedbar-set-mode-line-format, speedbar-reconfigure-keymaps)
(speedbar-add-localized-speedbar-support, speedbar-check-vc)
(speedbar-highlight-one-tag-line)
(speedbar-unhighlight-one-tag-line): Remove XEmacs compat code.

* doc/misc/speedbar.texi (Frames and Faces): Remove documentation for
XEmacs.

5 years ago* lisp/vc/vc-annotate.el (vc-annotate-lines): Use set-face-extend (bug#37774)
Juri Linkov [Mon, 21 Oct 2019 21:29:21 +0000 (00:29 +0300)]
* lisp/vc/vc-annotate.el (vc-annotate-lines): Use set-face-extend (bug#37774)

5 years agoTry to not put SMTP passwords in the *Messages* buffer
Lars Ingebrigtsen [Mon, 21 Oct 2019 20:38:34 +0000 (22:38 +0200)]
Try to not put SMTP passwords in the *Messages* buffer

* lisp/mail/smtpmail.el (smtpmail--sanitize-error-message): New
function.
(smtpmail-send-it): Use it.
(smtpmail-send-queued-mail): Ditto.

5 years ago* lisp/emacs-lisp/cursor-sensor.el: Make it possible to reveal invisible text
Stefan Monnier [Mon, 21 Oct 2019 20:35:38 +0000 (16:35 -0400)]
* lisp/emacs-lisp/cursor-sensor.el: Make it possible to reveal invisible text

(cursor-sensor-mode): Hook into post-command-hook as well.
(cursor-sensor--detect): Make argument optional.

5 years agoTiny clean-up of previous edebug patch
Lars Ingebrigtsen [Mon, 21 Oct 2019 20:28:49 +0000 (22:28 +0200)]
Tiny clean-up of previous edebug patch

* lisp/emacs-lisp/edebug.el (edebug--overlay-breakpoints): Clean
up code slightly.

5 years agoEnsure we always remove the breakpoint overlays
Lars Ingebrigtsen [Mon, 21 Oct 2019 20:22:06 +0000 (22:22 +0200)]
Ensure we always remove the breakpoint overlays

* lisp/emacs-lisp/edebug.el (edebug--display-1): Remove the
overlays here -- this cleans up after exiting no matter how we
exited.

5 years agoAdd fringe markers to edebug breakpoints
Lars Ingebrigtsen [Mon, 21 Oct 2019 20:17:12 +0000 (22:17 +0200)]
Add fringe markers to edebug breakpoints

* lisp/emacs-lisp/edebug.el (edebug--overlay-breakpoints): Set a
fringe element to mark the breakpoint.
(edebug-breakpoint): Fringe marker.

5 years agoClean up previous icalendar.el change
Stefan Kangas [Mon, 21 Oct 2019 19:21:50 +0000 (21:21 +0200)]
Clean up previous icalendar.el change

* lisp/calendar/icalendar.el (icalendar--rris): Redefine as obsolete
function alias.

5 years agoRemove more XEmacs compat code from viper-*.el
Stefan Kangas [Mon, 21 Oct 2019 19:19:25 +0000 (21:19 +0200)]
Remove more XEmacs compat code from viper-*.el

* lisp/emulation/viper-cmd.el (viper-submit-report):
* lisp/emulation/viper-init.el (viper-set-insert-cursor-type)
(viper-restore-cursor-type, viper-use-replace-region-delimiters)
(viper-has-face-support-p, viper-window-display-p)
(viper-color-display-p, viper-device-type):
* lisp/emulation/viper-mous.el (viper-mouse-click-search-word)
(viper-mouse-click-insert-word, viper-mouse-click-get-word)
(viper-mouse-click-posn, viper-mouse-click-window):
* lisp/emulation/viper-util.el (viper-abbreviate-file-name)
(viper-set-replace-overlay, viper-maybe-checkout): Remove XEmacs
compat code.

5 years agoRemove XEmacs compat code from icalendar.el (Bug#37816)
Stefan Kangas [Mon, 21 Oct 2019 16:49:04 +0000 (18:49 +0200)]
Remove XEmacs compat code from icalendar.el (Bug#37816)

* lisp/calendar/icalendar.el (icalendar--convert-string-for-export)
(icalendar--convert-string-for-import)
(icalendar--parse-summary-and-rest)
(icalendar--convert-ordinary-to-ical)
(icalendar--convert-weekly-to-ical)
(icalendar--convert-yearly-to-ical)
(icalendar--convert-block-to-ical)
(icalendar--convert-cyclic-to-ical)
(icalendar--convert-anniversary-to-ical)
(icalendar--format-ical-event)
(icalendar--convert-recurring-to-diary): Remove XEmacs compat code.
(icalendar--rris): Declare obsolete.

5 years agoAvoid false indications from Flymake in .dir-locals.el files
Eli Zaretskii [Mon, 21 Oct 2019 11:29:13 +0000 (14:29 +0300)]
Avoid false indications from Flymake in .dir-locals.el files

* lisp/progmodes/elisp-mode.el (emacs-lisp-mode): Don't install
'elisp-flymake-checkdoc' and 'elisp-flymake-byte-compile'
hooks for .dir-locals.el files.  Reported by Clément
Pit-Claudel <cpitclaudel@gmail.com>.

5 years ago; Add commentary to w32inevt.c
Eli Zaretskii [Mon, 21 Oct 2019 10:32:40 +0000 (13:32 +0300)]
; Add commentary to w32inevt.c

* src/w32inevt.c (do_mouse_event): Comment on mouse
coordinates in console mouse-wheel events.