1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-03 10:31:37 -08:00
Commit graph

144321 commits

Author SHA1 Message Date
Michael Albinus
c0c6cd2d5d Add 'remote-file-error' for Tramp
* doc/lispref/errors.texi (Standard Errors): Add 'remote-file-error'.

* etc/NEWS: Mention 'remote-file-error'.

* lisp/net/ange-ftp.el (ftp-error): Add error condition
`remote-file-error'.

* lisp/net/tramp-cmds.el (tramp-cleanup-all-connections): Do not set
`tramp-locked'.

* lisp/net/tramp-compat.el (remote-file-error): Define if it
doesn't exist.

* lisp/net/tramp-sh.el (tramp-timeout-session): Check for "locked"
property.
(tramp-maybe-open-connection): Simplify.

* lisp/net/tramp.el (tramp-locked, tramp-locker): Remove them.
(tramp-file-name-handler): Do not set them.
(with-tramp-locked-connection): New defmacro.
(tramp-accept-process-output, tramp-send-string): Use it.

* src/fileio.c (Qremote_file_error): New error symbol.

* test/lisp/net/tramp-tests.el (tramp-test43-asynchronous-requests):
Adapt test.  Remove :unstable tag.
2020-12-14 19:30:01 +01:00
Eli Zaretskii
47a854bf24 Improve accuracy of scrolling commands
* src/xdisp.c (move_it_vertically_backward): Don't rely on
line_bottom_y for accurate calculation of the next screen line's Y
coordinate: it doesn't work when the current screen line was not
yet traversed.  Instead, record the previous Y coordinate and
reseat there if overshoot is detected.
* src/window.c (window_scroll_pixel_based): Calculate the new
window-start point more accurately when screen lines have uneven
height.  (Bug#8355)
2020-12-14 20:23:24 +02:00
Stefan Kangas
2f1441cbe3 Make XEmacs entry in the FAQ more contemporary
* doc/misc/efaq.texi (Difference between Emacs and XEmacs): Make
XEmacs entry in the FAQ more contemporary.  Remove part about re-using
XEmacs code; this is not likely to be relevant these days and in any
case is not a frequently asked question.  (Bug#45235)
2020-12-14 19:21:28 +01:00
Eric Abrahamsen
afee776594 Fix logic of gnus-search-imap-handle-date
* lisp/gnus/gnus-search.el (gnus-search-imap-handle-date): Just
rewrite this whole ridiculous function.
2020-12-14 09:27:05 -08:00
Stefan Kangas
b857ea24f7 * lisp/play/5x5.el: Fix typo. Remove redundant :group args. 2020-12-14 18:08:20 +01:00
Tim Ruffing
e5348f125f * etc/emacs.service:
* etc/emacs.service (ExecStart): Make Emacs exit from systemd work
better (bug#45181).

The problem here is the exit code 15, which emacs will return *only* if
it has received SIGTERM. I believe what's happening here is that
emacsclient will call kill-emacs but not wait until the emacs server
has properly shut down. However, it's supposed to wait for the shutdown
as an "ExecStop" command according to "man systemd.service". So since
the process is still alive when emacsclient comes back, systemd will
still issue SIGTERM, making emacs return 15 (maybe after calling kill-
emacs again?!).

Copyright-paperwork-exempt: yes
2020-12-14 17:59:58 +01:00
Robert Thorpe
b63cb95ad4 Mention how to handle user names with @ in rmail
* doc/emacs/rmail.texi (Remote Mailboxes): Mention how to work
around the problem with user names like foo@example.com (bug#16946).

Copyright-paperwork-exempt: yes
2020-12-14 17:51:25 +01:00
Daniel Martín
0dd8d53344 Make goto-char offer the number at point as default
* lisp/subr.el (read-natnum-interactive): New function to read natural
numbers for interactive functions.
* src/editfns.c (Fgoto_char): Call read-natnum-interactive from the
interactive definition of goto-char to offer the number at point as
default.  Also expand the docstring to document this new interactive
behavior.
* doc/emacs/basic.texi (Moving Point): Expand the Emacs manual to
document this new behavior.
* etc/NEWS: And announce it (bug#45199).
2020-12-14 17:16:00 +01:00
Lars Ingebrigtsen
10bc4eac5b Tool bar documentation clarification: Mention forcing updates
* doc/lispref/keymaps.texi (Tool Bar): Document that flipping the
status of a tool bar item doesn't necessarily update the visuals
(bug#42957).
2020-12-14 17:07:41 +01:00
Tomas Nordin
8b3de06347 Fix narrow-to-defun in python-mode
* lisp/progmodes/python.el (python-nav--beginning-of-defun): Make
narrow-to-defun work better in classes (bug#40563).

Copyright-paperwork-exempt: yes
2020-12-14 16:58:07 +01:00
Lars Ingebrigtsen
252366866b Add a new recursively bound `current-minibuffer-command' variable
* doc/lispref/commands.texi (Command Loop Info): Document it
(bug#45177).

* src/callint.c (Fcall_interactively): Bind it.

* src/keyboard.c (syms_of_keyboard): Define
current-minibuffer-command.
2020-12-14 16:44:00 +01:00
Ulrich Ölmann
f6454ad6cd Add a DirectoryMode to the Emacs Server example
* doc/emacs/misc.texi (Emacs Server): Update example

* doc/emacs/misc.texi (Emacs Server): The socket containing directory
is per default created with permissions 0755 by the socket-unit.
However this is considered unsafe since commit [1], so enhance unit
example with systemd configuration directive `DirectoryMode=' to
create it with safe permissions, see
https://www.freedesktop.org/software/systemd/man/systemd.socket.html#DirectoryMode=

[1] 2003-04-12 "(server-socket-name): Use new safe location for socket."

Copyright-paperwork-exempt: yes
2020-12-14 16:02:54 +01:00
Stefan Kangas
e8a358c3be Update value of frame-title-format in FAQ
* doc/misc/efaq.texi (Displaying the current file name in the
titlebar): Fix default value of frame-title-format.
2020-12-14 16:24:24 +01:00
Stefan Kangas
5c361035db Don't recommend setnu and wb-line-number
* doc/misc/efaq.texi (Displaying the current line or column): Remove
reference to third-party alternatives to display-line-numbers-mode.
2020-12-14 16:22:22 +01:00
Stefan Kangas
95c9aad041 Remove more references to old versions from FAQ
* doc/misc/efaq.texi (Learning how to do something)
(Installing Emacs, Emacs for GNUstep, Emacs for macOS): Remove more
references to Emacs 22 and older from FAQ.
2020-12-14 15:52:38 +01:00
Stefan Kangas
4c41a8acc0 Make XEmacs compat variable warning-level-aliases obsolete
* lisp/emacs-lisp/warnings.el (warning-level-aliases): Make obsolete.
(display-warning): Warn when using one of the warning levels defined
in above obsolete variable.  (Bug#44849)
* lisp/url/url-proxy.el (url-find-proxy-for-url): Replace obsolete
warning type 'critical with :error.
2020-12-14 15:16:13 +01:00
Stefan Kangas
f1dae2551c Prefer setq to set+quote
* lisp/cedet/semantic/senator.el (senator-lazy-highlight-update):
* lisp/emulation/edt.el (edt-find, edt-restore-key)
(edt-remember):
* lisp/eshell/em-ls.el (eshell-ls--insert-directory):
* lisp/net/tramp-sh.el (tramp-sh-handle-write-region):
* lisp/progmodes/hideif.el (hide-ifdef-mode):
* test/lisp/url/url-future-tests.el (url-future-tests): Prefer setq to
set+quote.
2020-12-14 15:11:05 +01:00
Stefan Kangas
c9758ba48a * lisp/bookmark.el: Doc fix. 2020-12-14 15:11:05 +01:00
Mattias Engdegård
6858119bcd ; * lisp/progmodes/project.el (project-switch-use-entire-map): Typo 2020-12-14 12:33:05 +01:00
Torsten Hilbrich
c42965745d Merge branch 'feature/integration-of-dictionary-el'
b6227446d9 Importing dictionary module
658ec3ccee Renamed connection.el
e2ebffdd62 Renamed link.el
723906c444 Removed some compability parts in dictionary
5dc17d73b0 Add :version tag to defcustom statement
49c250b388 Dont't check coding-system-list for existence
99a7e918c8 Don't check for existence of defface
1773b9b687 Dictionary now uses button
329b6a0210 Adding details page for dictionary
837505075c Fix dictionary tooltip mode
2f1e4fbc42 Support nil value for dictionary-server
91ff1c8f7c Move placement of dictionary-tooltip-mouse-event
28fe134971 Remove text property from empty line
7ca331a4f9 Add history of search words to read-string
d5a4da25b0 * lisp/net/dictionary.el: Remove remnants of package
cc5f280378 * lisp/net/dictionary.el: Add lexical-binding:t
09952ce434 Removed useless check for popup-menu
81ebe86d8d Show error message when asking to match for nothing
0044a2e888 * lisp/net/dictionary-connection.el: Add lexical-binding:t
f58443780c * lisp/net/dictionary-connection.el: Remove obsolete Version
54a3964e29 Update GPL version
a557a103cc * lisp/net/dictionary-connection.el: Prefer defsubst
ffa7d6671d * lisp/net/dictionary.el: Prefer defsubst over defmacro
4deb8618e4 * lisp/net/dictionary.el (dictionary-mode): Use setq-local
d30618cbc1 * lisp/net/dictionary.el (dictionary-tooltip-mode): Use ...
a25a12ddaf Use when where else case returns nil
89e9c1686e * lisp/net/dictionary.el (dictionary-display-more-info): ...
d466231c3e A number of docstring fixes
b18217eb87 A number of docstring fixes
ca0de4d1e0 * etc/NEWS: Add entry for dictionary.el
62d14e10f9 * lisp/net/dictionary.el (dictionary-pre-buffer): Unify casing
2020-12-14 12:09:41 +01:00
Torsten Hilbrich
62d14e10f9 * lisp/net/dictionary.el (dictionary-pre-buffer): Unify casing
Let all the buttons begins with an upper-case character and the rest of
the text is lower-case.
2020-12-14 11:45:24 +01:00
Torsten Hilbrich
ca0de4d1e0 * etc/NEWS: Add entry for dictionary.el 2020-12-14 11:45:24 +01:00
Torsten Hilbrich
b18217eb87 A number of docstring fixes
* lisp/net/dictionary-connection.el (dictionary-connection-p,
  dictionary-connection-read-point, dictionary-connection-process,
  dictionary-connection-buffer, dictionary-connection-set-read-point,
  dictionary-connection-set-process, dictionary-connection-set-buffer,
  dictionary-connection-create-data, dictionary-connection-open,
  dictionary-connection-status, dictionary-connection-close,
  dictionary-connection-send, dictionary-connection-send-crlf,
  dictionary-connection-read, dictionary-connection-read-crlf,
  dictionary-connection-read-to-point): Fix docstring
2020-12-14 11:45:24 +01:00
Torsten Hilbrich
d466231c3e A number of docstring fixes
* lisp/net/dictionary.el (dictionary-set-server-var, dictionary-mode,
  dictionary, dictionary-new-buffer, dictionary-reply-code,
  dictionary-reply, dictionary-reply-list, dictionary-open-server,
  dictionary-check-connection, dictionary-mode-p, dictionary-close,
  dictionary-read-reply, dictionary-split-string,
  dictionary-read-reply-and-split, dictionary-read-answer,
  dictionary-check-reply, dictionary-coding-system,
  dictionary-decode-charset, dictionary-encode-charset,
  dictionary-check-initial-reply, dictionary-store-state,
  dictionary-restore-state, dictionary-new-search,
  dictionary-new-search-internal, dictionary-do-search,
  dictionary-pre-buffer, dictionary-post-buffer,
  dictionary-display-search-result, dictionary-display-word-entry,
  dictionary-display-word-definition, dictionary-mark-reference,
  dictionary-select-dictionary, dictionary-display-dictionarys,
  dictionary-display-dictionary-line, dictionary-set-dictionary,
  dictionary-special-dictionary, dictionary-display-more-info,
  dictionary-select-strategy, dictionary-do-select-strategy,
  dictionary-display-strategies, dictionary-display-strategy-line,
  dictionary-set-strategy, dictionary-new-matching,
  dictionary-do-matching, dictionary-display-only-match-result,
  dictionary-display-match-result, dictionary-display-match-result,
  dictionary-display-match-lines, dictionary-search,
  dictionary-previous, dictionary-help, dictionary-match-words,
  dictionary-mouse-popup-matching-words,
  dictionary-popup-matching-words, dictionary-tooltip-mode,
  dictionary-tooltip-mouse-event): Fix docstring

The following kind of changes were made:

- finish first line with a full stop (.)
- mention parameter in upper-case whenever possible (considering the
  length constraints)
2020-12-14 11:45:24 +01:00
Torsten Hilbrich
89e9c1686e * lisp/net/dictionary.el (dictionary-display-more-info): Spelling fix
Fix the spelling in the error message for non-existing dictionary.
2020-12-14 11:45:24 +01:00
Torsten Hilbrich
a25a12ddaf Use when where else case returns nil
* lisp/net/dictionary-connection.el (dictionary-connection-status,
dictionary-connection-close): Instead of returning nil in the else case
of the if just use when.

Was suggested by Stefan Kangas.
2020-12-14 11:45:24 +01:00
Torsten Hilbrich
d30618cbc1 * lisp/net/dictionary.el (dictionary-tooltip-mode): Use setq-local 2020-12-14 11:45:24 +01:00
Torsten Hilbrich
4deb8618e4 * lisp/net/dictionary.el (dictionary-mode): Use setq-local 2020-12-14 11:45:24 +01:00
Torsten Hilbrich
ffa7d6671d * lisp/net/dictionary.el: Prefer defsubst over defmacro 2020-12-14 11:45:24 +01:00
Torsten Hilbrich
a557a103cc * lisp/net/dictionary-connection.el: Prefer defsubst
Use defsubst instead of defmacro here. It was suggested by Stefan
Kangas to replace the defmacro here and, looking at the lispref,
defsubst seems to be a suitable replacement providing the same
benefit of inlining functionality as the defmacro.
2020-12-14 11:45:24 +01:00
Torsten Hilbrich
54a3964e29 Update GPL version
* lisp/net/dictionary.el: Use GPL version 3 or later
* lisp/net/dictionary-connection.el: Use GPL version 3 or later
2020-12-14 11:45:24 +01:00
Torsten Hilbrich
f58443780c * lisp/net/dictionary-connection.el: Remove obsolete Version 2020-12-14 11:45:24 +01:00
Torsten Hilbrich
0044a2e888 * lisp/net/dictionary-connection.el: Add lexical-binding:t 2020-12-14 11:45:24 +01:00
Torsten Hilbrich
81ebe86d8d Show error message when asking to match for nothing
* lisp/net/dictionary.el (dictionary-popup-matching-words): Show error
if neither the parameter nor the word at point are defined

This avoids an error later on when the nil value is used as string
within dictionary-encode-charset.
2020-12-14 11:45:24 +01:00
Torsten Hilbrich
09952ce434 Removed useless check for popup-menu
* lisp/net/dictionary.el (dictionary-popup-matching-words): No need to
check for popup-menu, the code is part of Emacs now and the function
should always be there
2020-12-14 11:45:24 +01:00
Torsten Hilbrich
cc5f280378 * lisp/net/dictionary.el: Add lexical-binding:t
Fixing all the issues found by this. A number of unused variables were
reported here.
2020-12-14 11:45:24 +01:00
Gabriel do Nascimento Ribeiro
c6c4e74603 New option tab-bar-history-buttons-show
* lisp/tab-bar.el (tab-bar-history-buttons-show): If true,
    show back and forward buttons when tab-bar-history-mode
    is enabled.  (Bug#45227)

    Copyright-paperwork-exempt: yes
2020-12-14 10:54:52 +02:00
Juri Linkov
e948cdbfa8 Allow creating a new tab for tab-switcher from the minibuffer (bug#45072)
* lisp/tab-bar.el (tab-switcher): Simplify by let-binding
tab-bar-new-tab-choice to t before calling tab-bar-new-tab
that handles the case when it's called in the active minibuffer.
2020-12-14 10:52:05 +02:00
Juri Linkov
dc6e616dfe Don't show matches with no input for nil icomplete-show-matches-on-no-input
* lisp/icomplete.el (icomplete-show-matches-on-no-input): Fix docstring.
(icomplete--initial-input): New internal variable.
(icomplete-minibuffer-setup): Set buffer-local
icomplete--initial-input to icomplete--field-string.
(icomplete-ret, icomplete-force-complete-and-exit)
(icomplete--sorted-completions, icomplete-exhibit):
Compare icomplete--initial-input with icomplete--field-string
to detect no input.  (Bug#19031)

etc/NEWS: Remove duplicate entry.
2020-12-14 10:44:04 +02:00
João Távora
755a9f2a8b Inhibit quit in ElDoc timer functions (bug#45117)
The point of un-inhibiting it was to make ElDoc backends interruptible
with any input (as in while-no-input), since that should in principle
invalidate the need of the current ElDoc processing.  But that
strategy is dangerous for backends that perform complex
synchronization with external processes.  Better let each backend
decide for itself it needs this eager interruptive behavior, like is
presumably the case with the Octave backend.

This reverts a part of

    commit 12e922156c
    Author: Stefan Monnier <monnier@iro.umontreal.ca>
    Date:   Tue Dec 4 18:15:44 2018 -0500

* lisp/emacs-lisp/eldoc.el (eldoc-print-current-symbol-info):

* lisp/progmodes/octave.el (octave-eldoc-function-signatures): Use
while-no-input.
2020-12-13 23:16:53 +00:00
Dmitry Gutov
51698f77dd Remove the duplication from project-switch-commands's config
Based on an older patch by Philip K (https://debbugs.gnu.org/41890#127).

* lisp/progmodes/project.el: (project-switch-commands): Change to
'defcustom', alter the value format, add :type.
(project-switch-use-entire-map): New option.
(project--keymap-prompt, project-switch-project):
Update accordingly, while keeping compatibility with user-defined
values in the previous format (for some transition period).

Co-authored-by: Philip K. <philipk@posteo.net>
2020-12-13 22:50:55 +02:00
Philipp Stephani
fe50a8b9ba Byte compilation: handle case where the output file is a mountpoint.
See Bug#44631.  While testing for a readonly output directory has
slightly different semantics, in practice they should cover cases
where Emacs is sandboxed and can only write to the destination file,
not its directory.

* lisp/emacs-lisp/bytecomp.el (byte-compile-file): Handle the case
where the output directory is not writable.

* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests--not-writable-directory)
(bytecomp-tests--dest-mountpoint): New unit tests.
2020-12-13 17:17:21 +01:00
Mauro Aranda
897b8561cd Stop dropping the tag when creating the custom-variable widget
* lisp/cus-edit.el (custom-variable-value-create): Obey the specified
tag format when creating the variable tag, but stop dropping the tag
format for the variable's type widget, since the tag can be used to
give useful information to the user about the variable.  (Bug#35133)
2020-12-13 10:44:30 -03:00
Lars Ingebrigtsen
f7133be7ae Make dired-toggle-read-only query on read-only directories
* lisp/dired.el (dired-toggle-read-only): Query instead of
erroring out immediately (bug#29412).
2020-12-13 14:17:55 +01:00
Lars Ingebrigtsen
1c115e404e Clarify Extended Menu Items a bit more
* doc/lispref/keymaps.texi (Extended Menu Items): Expand a bit
more on how submenus are formed (bug#26428).
2020-12-13 13:49:25 +01:00
Andrea Corallo
831659b3b8 * Fix `memory-report' for '--without-x' builds
* lisp/emacs-lisp/memory-report.el
	(memory-report--image-cache): Don't call `image-cache-size' if
	unbound.
2020-12-13 11:09:20 +01:00
Dmitry Gutov
2d790c6c57 Bump project.el version
* lisp/progmodes/project.el: Bump the version.
2020-12-13 04:12:35 +02:00
Andrii Kolomoiets
6fc1b795c1 vc-create-tag: use vc-revision-history variable
* lisp/vc/vc.el (vc-create-tag): Use 'vc-revision-history' variable.
2020-12-13 04:00:49 +02:00
Dmitry Gutov
ebab7c48c3 Fix test failure
* test/lisp/vc/vc-tests.el (vc-test--working-revision):
Accept working revision -1, expected for older Hg (bug#36534).
2020-12-13 03:59:33 +02:00
Stefan Monnier
185b0820b8 * lisp/emacs-lisp/bytecomp.el: Allow a nil destination file
(byte-compile--default-dest-file): New function, extracted from
byte-compile-dest-file.
(byte-compile-dest-file): Use it.
(byte-compile-dest-file-function): Give it a non-nil default value.
(byte-recompile-file, byte-compile-file): Handle a nil return value
from `byte-compile-dest-file`.

* lisp/progmodes/elisp-mode.el (elisp-flymake--batch-compile-for-flymake):
Tell the compiler not to write the result, instead of writing it to
a dummy temp file.
2020-12-12 19:19:03 -05:00