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

74972 Commits

Author SHA1 Message Date
Paul Eggert
d02f2a793e * lisp/simple.el: Minor fixes to commentary. 2020-01-22 11:03:59 -08:00
Christophe Deleuze
4f2b967795 Fix doc strings for image-dired rotation commands
* lisp/image-dired.el (image-dired-rotate-thumbnail-left)
(image-dired-rotate-thumbnail-right)
(image-dired-rotate-original-left)
(image-dired-rotate-original-right): Move the text in the doc
strings about rotating the originals to the correct commands
(bug#38928).
2020-01-22 17:05:13 +01:00
Dmitry Gutov
3b0938c042 Render Ido suggestions using an overlay
* lisp/ido.el (ido--overlay): New variable.
(ido-exhibit): Render with 'after-string' on an overlay
(bug#38457).
2020-01-22 14:47:26 +03:00
Stefan Monnier
ac09e8e121 * lisp/vc/smerge-mode.el (smerge-match-conflict): Fix bug#38456
This situation is not an internal error, but a perfectly normal occurrence,
so a `cl-assert` is not right
2020-01-21 15:58:17 -05:00
Eli Zaretskii
5abd8d73b0 Improve display of temporary echo messages
* lisp/minibuffer.el (set-minibuffer-message): Fix cursor position
for the temporary display of an echo-area message when minibuffer
is active.  Ensure the message is visible even if the end of the
completion candidates presented by the likes of Icomplete mode is
not visible due to its length, under resize-mini-windows = nil.
(Bug#38457)
2020-01-21 17:58:23 +02:00
Juri Linkov
f2f9f2f98e * lisp/menu-bar.el: Remove desktop-save-mode from release branch (bug#37594)
; Not to be merged to master
2020-01-21 01:09:04 +02:00
Juri Linkov
3ba0db41e3 Allow optional truncation of tab names in tab-bar and tab-line (bug#38693)
* lisp/tab-line.el (tab-line-tab-name-truncated-max): New defcustom.
(tab-line-tab-name-truncated-buffer): Use tab-line-tab-name-truncated-max
consistently with similar options in tab-bar.el.
(tab-line-tabs-limit): Remove variable.
(tab-line-tabs-window-buffers): Remove use of tab-line-tabs-limit
that was an experimental feature before horizontal scrolling was implemented.
(tab-line-close-tab-function): Rename from tab-line-close-tab-action
and allow a customizaed function as option.
(tab-line-close-tab): Call function if tab-line-close-tab-function
is customized to a function.

* lisp/tab-bar.el (tab-bar-tab-name-function): Add option
tab-bar-tab-name-truncated.
(tab-bar-tab-name-truncated-max): New defcustom.
(tab-bar-tab-name-truncated-ellipsis): New variable.
(tab-bar-tab-name-truncated): New function.
2020-01-21 01:03:37 +02:00
Juri Linkov
92f30d62c0 * lisp/tab-line.el (tab-line-auto-hscroll): Fix for long tab names.
Check for nil value returned by previous-single-property-change that
happens when tab name is longer than window width.
2020-01-20 02:35:53 +02:00
Juri Linkov
dde313151d * lisp/menu-bar.el (menu-bar-options-menu): Add desktop-save-mode (bug#37594) 2020-01-20 02:14:24 +02:00
Tino Calancha
2eb0b7835d Fix shell-command-dont-erase-buffer feature
* lisp/simple.el (shell-command-dont-erase-buffer):
The default, nil, is backward compatible, i.e. it erases the buffer
only if the output buffer is not the current one; the new value 'erase
always erases the output buffer.
Update docstring.

(shell-command-save-pos-or-erase):
Add optional arg output-to-current-buffer.
Rename it so that it's not internal.  All callers updated.

(shell-command-set-point-after-cmd): Rename it so that it's not internal.
All callers updated.
Adjust it to cover a side case.

(shell-command): Adjust logic to match the specification (Bug#39067).
Enable the feature when the output buffer is the current one.

(shell-command-on-region): Little tweak to follow
`shell-command-dont-erase-buffer' specification.

* test/lisp/simple-tests.el (with-shell-command-dont-erase-buffer):
Add helper macro.
(simple-tests-shell-command-39067)
(simple-tests-shell-command-dont-erase-buffer): Add tests.

* doc/emacs/misc.texi (Single Shell): Update manual.

* etc/NEWS (Single shell commands): Announce the change.
2020-01-19 11:13:02 +01:00
Stefan Kangas
fabf0065c5 Doc fixes in package.el
* lisp/emacs-lisp/package.el (package-process-define-package)
(package-generate-description-file): Doc fixes.
(package-generate-autoloads, package--write-file-no-coding)
(package--archive-file-exists-p, package-desc-status): Add doc
strings.
2020-01-19 00:51:58 +01:00
Eric Abrahamsen
5118394e5b Ensure that gnus-summary-attach-article finds the right articles
* lisp/gnus/gnus-msg.el (gnus-summary-attach-article): Before
iterating over the articles to attach, first close any open
article. Using `set-buffer' required `gnus-summary-select-article' to
re-set the buffer every time, meaning we never got off the original
article.

(cherry picked from commit 447bb1313a)
2020-01-18 13:55:18 -08:00
Stefan Kangas
f3d30b5303 Remove some doc references to old Emacs versions
* doc/misc/efaq.texi (Horizontal scrolling): Remove section
only relevant to Emacs 21 or older.
(Repeating commands, Editing MS-DOS files):
* lisp/progmodes/gdb-mi.el:
* lisp/woman.el: Doc fix - remove some references to Emacs 20 and older.
2020-01-18 19:56:54 +01:00
Pieter van Oostrum
4217bc229b Fix infloop in shell.el
* test/lisp/shell-tests.el (shell-tests-completion-before-semi):
Amend the shell.el tests to catch errors such as bug#39057.

* lisp/shell.el (shell--parse-pcomplete-arguments): Skip the
semi-colon as well.  This avoids inflooping when a semi-colon is
typed by the user.  (Bug#39057)

Copyright-paperwork-exempt: yes
2020-01-18 11:54:03 +02:00
Amin Bandali
74b151195d
Fix erc-notifications-notify for non-PRIVMSGs, broken in last commit
* lisp/erc/erc-desktop-notifications.el (erc-notifications-notify):
Take optional argument `privp', to be non-nil when notifying for a
PRIVMSG.  This is to work around bug introduced in last commit, as
`erc-get-buffer' may return nil for non-PRIVMSG cases.
(erc-notifications-PRIVMSG): Call erc-notifications-notify with
non-nil `privp', as described above.
2020-01-17 23:56:00 -05:00
Amin Bandali
db4436eaf9
Fix the notification action for PRIVMSG in erc-notifications-notify
* lisp/erc/erc-desktop-notifications.el (erc-notifications-notify):
explicitly request the buffer for `nick', rather than relying on
(current-buffer) returning it.  That works fine for the very first
PRIVMSG sent by `nick', but ERC seems to handle subsequent PRIVMSGs
differently, where (current-buffer) would return the server buffer
rather than the existing buffer for PRIVMSGs from `nick'.
2020-01-17 22:44:49 -05:00
Amin Bandali
36a4068105
ERC: New maintainer.
* admin/MAINTAINERS: Add entries for Amin Bandali, new maintainer for
ERC, and interested in maintaining Eshell.
* lisp/erc/*: New maintainer.
2020-01-17 21:45:10 -05:00
Paul Eggert
2391d3f45d ; spelling fixes 2020-01-17 14:24:15 -08:00
Dmitry Gutov
e898442be3 Honor tags-case-fold-search during xref identifer completion
* etc/NEWS: New entry.

* lisp/progmodes/etags.el (tags-case-fold-search):
Mark as safe-local.
(find-tag--completion-ignore-case):
Extract from tags-completion-at-point-function, find-tag-tag and
etags--xref-find-definitions.
(xref-backend-identifier-completion-ignore-case):
New method. Use it here as well.

* lisp/progmodes/xref.el
(xref-backend-identifier-completion-ignore-case): New generic.
(xref--read-identifier): Use it here.
2020-01-18 00:23:46 +03:00
Eli Zaretskii
a785be29bf Fix wording and punctuation of a recent commit
* lisp/textmodes/ispell.el (ispell-correct-p): Doc fix.
* lisp/emacs-lisp/checkdoc.el (checkdoc-ispell-init): Fix
capitalization and punctuation of comments.
2020-01-17 11:35:35 +02:00
Damien Cassou
6338f69102 Add unattended spell-checking to checkdoc
This commit makes checkdoc capable of spell-checking even when the
user isn't using it interactively.  When TAKE-NOTES is non-nil,
checkdoc will run spell-checking (with ispell) and report spelling
mistakes.

Fixes: (bug#38583).

* lisp/textmodes/ispell.el (ispell-word): Extract part of it to
`ispell--run-on-word`.
(ispell--run-on-word): New function, extracted from `ispell-word`.
(ispell-error-checking-word): New function.
(ispell-correct-p): New function.  Use `ispell--run-on-word` and
`ispell-error-checking-word`.
* lisp/emacs-lisp/checkdoc.el (checkdoc-current-buffer): Pass
TAKE-NOTES to `checkdoc-start`.
(checkdoc-continue): Pass TAKE-NOTES to `checkdoc-this-string-valid`.
(checkdoc-this-string-valid): Add optional argument TAKE-NOTES and
pass it to `checkdoc-this-string-valid-engine`.
(checkdoc-this-string-valid-engine): Add optional argument TAKE-NOTES
and pass it to `checkdoc-ispell-docstring-engine`.
(checkdoc-ispell-init): Call `ispell-set-spellchecker-params` and
`ispell-accept-buffer-local-defs`.  These calls are required to
properly use ispell.  The problem went unnoticed until now because
checkdoc was only using ispell through the high-level command
`ispell-word` which takes care of all the initialization for the user.
(checkdoc-ispell-docstring-engine): Add optional argument TAKE-NOTES
to force reporting of spell-checking errors.  Throw error
when (checkdoc-ispell-init) fails configuring ispell.  Replace a
few (if cond nil body) with (unless cond body). Replace (let ((var
nil))) with (let (var)).  Replace (if (not (eq checkdoc-autofix-flag
'never)) body) with just body because `checkdoc-autofix-flag` is
checked at the beginning of the function.

(cherry picked from commit 25adbc4a5e)
2020-01-17 11:29:06 +02:00
Lin Sun
4453acbdc9 Fix the error message from makefile-move-to-macro
* lisp/cedet/ede/makefile-edit.el (makefile-macro-file-list):
regexp-quote the param in makefile-move-to-macro (Bug#39094).

(cherry picked from commit a36495da1e)
2020-01-17 10:15:23 +02:00
Stefan Kangas
b78426526c ; * lisp/obsolete/vc-arch.el: Add missing "Obsolete-since" tag. 2020-01-17 07:03:41 +01:00
Stefan Kangas
3fb37dc9a4 ; * lisp/ezimage.el: Fix typo. 2020-01-17 06:34:00 +01:00
Stefan Monnier
52080b5778 * lisp/minibuffer.el (read-file-name-default): Fix bug#39057 2020-01-16 10:18:39 -05:00
Robert Pluim
13995f31a2 Make emacs prefer an existing ~/.emacs.d to an existing XDG location
* doc/emacs/custom.texi (Find Init): Update description of how Emacs
finds its init file directory and the interaction with
$XDG_CONFIG_HOME
(Early Init File): Correct XDG location of early-init.el

* etc/NEWS: Update description to make it clear the ~/.emacs.d is
preferred, even if the XDG location exists.

* lisp/startup.el: Prefer ~/.emacs.d even if the XDG location exists.

* lib-src/emacsclient.c (open_config): Prefer home directory the XDG
location.
2020-01-16 16:05:45 +01:00
Glenn Morris
23b87db628 ; Unmaintain fortran elisp 2020-01-15 18:49:21 -08:00
Glenn Morris
3b0d1a50aa f90: handle F2008 module function
* lisp/progmodes/f90.el (f90-font-lock-keywords-1)
(f90-looking-at-program-block-start):
Handle F2008 "module function" and subroutine.  (Bug#38415)
* test/lisp/progmodes/f90-tests.el (f90-test-bug38415): New test.
2020-01-15 18:47:51 -08:00
Juri Linkov
55803cc189 Move shell-related menu items to "Shell Commands" submenu (bug#37594)
* lisp/menu-bar.el (menu-bar-shell-commands-menu): New variable.
(menu-bar-tools-menu): Move shell-related menu items to
'menu-bar-shell-commands-menu' and add menu items for
'async-shell-command' and 'shell'.
2020-01-16 01:30:33 +02:00
Juri Linkov
fdee034ac8 * lisp/isearch.el: Fix corner cases of isearch-lazy-count.
* lisp/isearch.el (isearch-mode): Reset isearch-lazy-count-current
and isearch-lazy-count-total to nil, so when isearch-mode is started,
there should be no counts from previous Isearch.
(isearch-lazy-highlight-new-loop): Call isearch-message after resetting
lazy-count variables only when isearch-mode is started.  This avoids
the problem of inappropriate calls of isearch-message-function
when query-replace in the minibuffer performs lazy-highlighting that
used to call minibuffer-history-isearch-message unnecessarily.
2020-01-15 02:02:53 +02:00
Eli Zaretskii
7b14329d86 ; * lisp/simple.el (messages-buffer): Doc fix. (Bug#39124) 2020-01-14 17:46:39 +02:00
Mattias Engdegård
d645628e3c Always use lexical-binding in lisp-interaction-mode (bug#38835)
* lisp/progmodes/elisp-mode.el (lisp-interaction-mode):
Set lexical-binding.
* lisp/startup.el (command-line, startup--get-buffer-create-scratch):
Don't set lexical-binding here.
* doc/lispref/variables.texi:
* etc/NEWS:
Make it clear that lisp-interaction-mode uses lexical-binding.
2020-01-13 18:03:41 +01:00
Robert Pluim
0ed9cfa7dc vc-dir: ensure we don't use a pager with git
* lisp/vc/vc-git.el (vc-git--call): Call git with '--no-pager' to
avoid hangs caused by remote pager settings (Bug#38688).
2020-01-13 09:26:41 +01:00
Amin Bandali
37e0d00c14
Improve ERC's matching of nicks and URLs (bug#38257)
* lisp/erc/erc-{button,match}.el (erc-{button,match}-syntax-table):
Omit (, ), and '; as they're not valid nick characters, per RFC 2812
section 2.3.1.  This enables correct matching/highlighting of nicks
when they're surrounded by parens, like (nick), and when adjacent to
an apostrophe, like nick's.
* lisp/erc/erc-button.el (erc-button-url-regexp): Use the regexp from
browse-url-button-regexp, which among other things, seems to handle
surrounding pair of parens better.
2020-01-13 01:51:00 -05:00
Juri Linkov
d47b157969 Handle tab-bar clicks on a GPM-capable console.
* src/term.c (handle_one_term_event): Call tty_handle_tab_bar_click.

* src/xdisp.c (tty_handle_tab_bar_click): Force reset of up_modifier bit
from the event modifiers.

* lisp/tab-line.el (tab-line-tab-current): No need to use inverse-video
on console/xterm because the selected tab already uses inverse-video.
2020-01-13 01:23:12 +02:00
Mauro Aranda
8addfa91c8 Reset to the standard value when reverting session's customizations
* lisp/cus-edit.el (custom-variable-reset-saved): When there is no
previous saved value, reset to the standard value.  (Bug#15214)
2020-01-11 10:36:59 +02:00
Mauro Aranda
d6f9b09777 Fix saving multiple themes
* lisp/custom.el (enable-theme): Be side-effect free when modifying
custom-enabled-themes.  (Bug#19999)
2020-01-11 10:31:44 +02:00
Mattias Engdegård
c556aabde8 Calc: fix interval entry (bug#39040)
* lisp/calc/calc.el (calcDigit-start): Initialise calc-prev-char to
something more reasonable, so that non-algebraic entry of intervals
whose start is a single digit, like (1..10), works properly.
Reported by Michel Schinz.
2020-01-10 20:03:51 +01:00
Eli Zaretskii
91cd3c1372 Fix horizontal line display in Custom buffers
* lisp/cus-edit.el (custom-group-value-create): Insert a newline
before calling 'custom-group--draw-horizontal-line'.  (Bug#39074)
2020-01-10 21:02:52 +02:00
Mattias Engdegård
ff8996a337 flymake: fix typo in variable binding (bug#38752)
This mistake was found by an experimental elisp optimiser.

* lisp/progmodes/flymake-proc.el (flymake-proc-stop-all-syntax-checks):
Add missing brackets.
2020-01-10 18:15:03 +01:00
João Távora
beec9f64a5 Add comment on fido-mode's file-sorting semantics
* lisp/icomplete.el (icomplete--sorted-completions): Add comment.
2020-01-09 10:08:44 +00:00
João Távora
eb3c6ad325 Consider non-string minibuffer-default in icomplete
Fixes: bug#38992

* lisp/icomplete.el (icomplete--sorted-completions): Consider
non-string minibuffer-default.
2020-01-09 10:08:43 +00:00
Eli Zaretskii
6cd9ccb0a2 Fix compression of directories in Dired
This fixes comporession and uncompression of directories on
MS-Windows, but also on other systems.  The original code used
":" as the REGEXP of the directory entry in
dired-compress-file-suffixes, which on Windows always matched any
absolute file name, and can also match unusual file names on Posix
hosts.  This false match would cause dired-compress-file to act as
if we are decompressing a directory, but use a command suitable
for compression, which would fail in interesting ways.
We now use a REGEXP that can never match any valid file name.

* lisp/dired-aux.el (dired-compress-file-suffixes): Make the
"compress directory" entry's REGEXP really fail to match any valid
file name.
(dired-compress-file): Adapt to the change in
dired-compress-file-suffixes.  (Bug#39024)
(dired-compress): If the current file is a directory, or if the
uncompressed file is a directory, don't remove the original from
the listing, since it is left in the filesystem.
2020-01-08 18:21:53 +02:00
Michael Albinus
af5709f16b Further enhancement on `tramp-file-local-name'
* lisp/net/tramp.el (tramp-file-local-name): Call `file-local-name'
if NAME is not a Tramp file name.
2020-01-08 09:54:04 +01:00
Alan Mackenzie
fb432446f5 Objective C Mode imenu: cease recognizing "functions" within comments, etc.
This fixes bug #38749.

* lisp/progmodes/cc-menus.el (cc-imenu-objc-function): Put a c-literal-limits
test around the innards of the main re-search-backward loop.
2020-01-07 20:11:37 +00:00
Dmitry Gutov
b46c75b16c xref-matches-in-files: Big Tramp speed-up
* lisp/progmodes/xref.el (xref-matches-in-files):
Greatly improve performance with remote files using Tramp
(bug#34343).
2020-01-07 16:30:37 +03:00
Michael Albinus
883b3490d8 * lisp/net/tramp.el (tramp-file-local-name): Remove `save-match-data'. 2020-01-07 13:10:35 +01:00
Paul Eggert
088bfcc2d8 Move “Fix some broken conditional forms” to master
Revert 2020-01-04T19:17:12Z!eggert@cs.ucla.edu
which recently I installed into the emacs-27 branch by mistake.
These patches are now on master instead (via merging).
Do not merge to master.
2020-01-05 11:50:31 -08:00
Martin Rudalics
448df8fec7 Improve doc-strings of 'quit-window' and 'quit-restore-window' (Bug#38819)
* lisp/window.el (quit-restore-window, quit-window): Make
doc-strings more consistent; add references to corresponding
section of the Elisp manual (Bug#38819).
2020-01-05 09:59:01 +01:00
Stephen Gildea
7f01dfca56 Fix MH-E bug #470: Show buffer discards text properties
* lisp/mh-e/mh-show.el (mh-display-msg): reset font lock and set
major mode *before* formatting message content.  This changes lets
fonts work when the Show buffer is reused for a new message.
(mh-show-mode): no longer set buffer-read-only; that is better done
by mh-display-msg after setting all content.
2020-01-04 15:30:53 -08:00