]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 years agoFix resetting of gnus-pick-line-number
Pankaj Jangid [Wed, 16 Dec 2020 22:34:20 +0000 (23:34 +0100)]
Fix resetting of gnus-pick-line-number

* lisp/gnus/gnus-sum.el (gnus-summary-read-group-1): Move setting
gnus-pick-line-number from here (bug#45269)...
(gnus-summary-prepare): To here.  This ensures that the number is
reset when regenerating the buffer, for instance when limiting it.

3 years agoDon't show minibuffer keybindings for suggestions in read-extended-command
Juri Linkov [Wed, 16 Dec 2020 21:27:11 +0000 (23:27 +0200)]
Don't show minibuffer keybindings for suggestions in read-extended-command

* lisp/simple.el (read-extended-command): Use 'affixation-function'
instead of 'annotation-function'.  (Bug#45035)
(read-extended-command--affixation): New function created from
'read-extended-command--annotation'.

3 years agoGive affixation-function higher priority over annotation-function (bug#45234)
Juri Linkov [Wed, 16 Dec 2020 21:19:46 +0000 (23:19 +0200)]
Give affixation-function higher priority over annotation-function (bug#45234)

* doc/lispref/minibuf.texi (Completion Variables)
(Programmed Completion): Describe precedence rules
of affixation-function and annotation-function.

* lisp/minibuffer.el (completion-metadata)
(completion-extra-properties): Describe precedence rules
of affixation-function and annotation-function.
(minibuffer-completion-help): First try to apply
affixation-function, if there is no such function,
try annotation-function.

3 years agoCPerl-mode: don't treat <<>> as starting a here-doc
Harald Jörg [Tue, 15 Dec 2020 17:53:03 +0000 (18:53 +0100)]
CPerl-mode: don't treat <<>> as starting a here-doc

* lisp/progmodes/cperl-mode.el (cperl-find-pods-heres): Detect
the "<<>>" operator (Bug#42455).

* test/lisp/progmodes/cperl-mode-tests.el
(cperl-test-bug-45255): Verify that <<>> does not start a
HERE-doc.

3 years agoUpdate short docs in cperl-mode
E. Choroba [Tue, 15 Dec 2020 13:37:50 +0000 (14:37 +0100)]
Update short docs in cperl-mode

* lisp/progmodes/cperl-mode.el (cperl-short-docs):
Update with some missing entries.  (Bug#45254)

3 years ago; * lisp/play/5x5.el: Fix my last change.
Stefan Kangas [Wed, 16 Dec 2020 14:20:46 +0000 (15:20 +0100)]
; * lisp/play/5x5.el: Fix my last change.

3 years ago(flymake-diag-region): Fall back to (end-of-thing 'symbol)
Dmitry Gutov [Wed, 16 Dec 2020 00:49:35 +0000 (02:49 +0200)]
(flymake-diag-region): Fall back to (end-of-thing 'symbol)

* lisp/progmodes/flymake.el (flymake-diag-region):
Fall back to (end-of-thing 'symbol) (bug#29193).

3 years agoFix C-n/C-p when a line starts with an image
Eli Zaretskii [Tue, 15 Dec 2020 17:34:16 +0000 (19:34 +0200)]
Fix C-n/C-p when a line starts with an image

* src/xdisp.c (move_it_to): Handle the case where the second call
to move_it_in_display_line_to under MOVE_TO_Y takes us farther
from TO_CHARPOS than the first call.  This fixes values returned
by pos-visible-in-window-p and posn-at-point when the screen line
starts with invisible text followed by an image.  (Bug#9092)

3 years ago; Merge from origin/emacs-27
Glenn Morris [Tue, 15 Dec 2020 17:24:21 +0000 (09:24 -0800)]
; Merge from origin/emacs-27

The following commit was skipped:

ee6c702e18 (origin/emacs-27) Fix error with fn key in NS port (bug#44...

3 years agoMerge from origin/emacs-27
Glenn Morris [Tue, 15 Dec 2020 17:24:21 +0000 (09:24 -0800)]
Merge from origin/emacs-27

668f0a7f84 Fix point location when completing in gdb-mi.el
2dbc95063b Update to Org 9.4.2
f22856a5c5 Update to Org 9.4.1

# Conflicts:
# doc/misc/org.texi
# lisp/org/ob-core.el
# lisp/org/ob-ruby.el
# lisp/org/ob-screen.el
# lisp/org/ol-gnus.el
# lisp/org/ol.el
# lisp/org/org.el

3 years ago; Merge from origin/emacs-27
Glenn Morris [Tue, 15 Dec 2020 17:23:37 +0000 (09:23 -0800)]
; Merge from origin/emacs-27

The following commit was skipped:

6aa9fe3e1b Fix crash in ns_mouse_position (bug#44313)

3 years agoMerge from origin/emacs-27
Glenn Morris [Tue, 15 Dec 2020 17:23:37 +0000 (09:23 -0800)]
Merge from origin/emacs-27

62a6934af9 Fix crash when using XRender and restoring image from X (b...
de032d41c6 Bind k to image-kill-buffer in doc-view-mode-map.

3 years agoFix setting breakpoints in "M-x gdb" when a source file is missing
Eli Zaretskii [Tue, 15 Dec 2020 17:19:43 +0000 (19:19 +0200)]
Fix setting breakpoints in "M-x gdb" when a source file is missing

* lisp/progmodes/gdb-mi.el (gdb-get-location): Fix control flow
logic when "fullname" is not found.  Unquote and unescape the full
file name by calling gdb-mi--c-string-from-string.  FLAG is a
string, not a character.  (Bug#15051)

3 years agoCC Mode: Optimize for scrolling large buffers containing few braces
Alan Mackenzie [Tue, 15 Dec 2020 12:09:47 +0000 (12:09 +0000)]
CC Mode: Optimize for scrolling large buffers containing few braces

This fixes bug #25706.  It particularly pertains to .h files which contain
only macro definitions.  Many of these files are to be found, for example, in
the driver sections of the Linux kernel.

* lisp/progmodes/cc-engine.el (c-beginning-of-statement-1, c-on-identifier)
(c-syntactic-skip-backward, c-find-decl-prefix-search, c-find-decl-spots)
(c-forward-name, c-back-over-list-of-member-inits)
(c-back-over-member-initializers, c-looking-at-inexpr-block)
(c-guess-basic-syntax): Give search limits to, or amend existing ones to
c-backward-syntactic-ws, c-forward-syntactic-ws, c-backward-token-2,
c-beginning-of-statement-1.
(c-determine-limit-no-macro): New function.
(c-determine-limit-get-base): Remove unlimted invocation of
c-backward-syntactic-ws.
(c-determine-limit): Exclude movement between two different macros.  Use new
function c-determine-limit-no-macro.
(c-back-over-list-of-member-inits): New parameter `limit'.

* lisp/progmodes/cc-fonts.el (c-font-lock-complex-decl-prepare)
(c-font-lock-declarations, c-font-lock-c++-using): Give search limits to, or
amend existing ones to c-backward-syntactic-ws, c-beginning-of-decl-1.

* lisp/progmodes/cc-mode.el (c-unfind-coalesced-tokens, c-before-changer)
(c-fl-decl-end): Give search limits to, or amend existing ones to
c-backward-syntactic-ws, c-forward-syntactic-ws, skip-chars-backward,
skip-chars-forward.

3 years agoRevert last change in tramp-maybe-open-connection)
Michael Albinus [Tue, 15 Dec 2020 11:50:50 +0000 (12:50 +0100)]
Revert last change in tramp-maybe-open-connection)

* lisp/net/tramp-sh.el (tramp-maybe-open-connection): Revert last change,
it causes trouble.

3 years agoFix electric pairs in rst-mode
Lars Ingebrigtsen [Tue, 15 Dec 2020 07:43:41 +0000 (08:43 +0100)]
Fix electric pairs in rst-mode

* lisp/textmodes/rst.el (rst-mode-syntax-table): Mark pairs in the
syntax table (bug#23413).
(rst-mode): Instead of setting electric-pair-pairs.

3 years agoBind current-minibuffer-command to this-command
Lars Ingebrigtsen [Tue, 15 Dec 2020 06:18:03 +0000 (07:18 +0100)]
Bind current-minibuffer-command to this-command

* src/callint.c (Fcall_interactively): Bind
current-minibuffer-command to this-command, as documented (bug#45177).

3 years ago* doc/lispref/errors.texi (Standard Errors): Fix xref.
Glenn Morris [Mon, 14 Dec 2020 21:51:22 +0000 (13:51 -0800)]
* doc/lispref/errors.texi (Standard Errors): Fix xref.

Though I am not sure "report a bug" is helpful.

3 years ago* doc/emacs/indent.texi (Indent Convenience): Fix use of @xref.
Glenn Morris [Mon, 14 Dec 2020 21:46:35 +0000 (13:46 -0800)]
* doc/emacs/indent.texi (Indent Convenience): Fix use of @xref.

3 years agoTiny fix for lispref/variables.texi
Glenn Morris [Mon, 14 Dec 2020 21:45:29 +0000 (13:45 -0800)]
Tiny fix for lispref/variables.texi

* doc/lispref/variables.texi (Converting to Lexical Binding):
@strong{Note...} produces a spurious cross-reference in Info;
reword to avoid that.

3 years ago* lisp/emacs-lisp/gv.el (error): Allow it as a place
Stefan Monnier [Mon, 14 Dec 2020 21:16:01 +0000 (16:16 -0500)]
* lisp/emacs-lisp/gv.el (error): Allow it as a place

3 years agoOptimise c-font-lock-<>-arglists, particularly for buffers with few <..> pairs
Alan Mackenzie [Mon, 14 Dec 2020 20:44:33 +0000 (20:44 +0000)]
Optimise c-font-lock-<>-arglists, particularly for buffers with few <..> pairs

* lisp/progmodes/cc-fonts.el (c-font-lock-<>-arglists): In place of a regexp
search for a complicated and slow regexp, search simply for "<" ouside of
literals together with add hoc testing of other requirements for a <...>
match.

* lisp/progmodes/cc-langs.el (c-nonsymbol-key): New c-lang-defvar from the
c-lang-const.

3 years agoFix error with fn key in NS port (bug#44533)
Alan Third [Tue, 10 Nov 2020 12:54:50 +0000 (12:54 +0000)]
Fix error with fn key in NS port (bug#44533)

* src/nsterm.m ([EmacsView keyDown:]): Move the correction for fn key
handling to before the modifiers are calculated.

(cherry picked from commit 7970610d48701a949ce443c94c71eac47d044197)

3 years agoOptimise c-parse-state for large buffers with few (if any) braces.
Alan Mackenzie [Mon, 14 Dec 2020 19:38:52 +0000 (19:38 +0000)]
Optimise c-parse-state for large buffers with few (if any) braces.

* lisp/progmodes/cc-engine (c-get-fallback-scan-pos): Search a maximum of
50,000 characters back for the two BODs.  Return nil if we dont' find them.
(c-parse-state-get-strategy): For strategy `forward', always use the position
`good-pos' for `start-point', even when there's a change of current macro.
Deal with a possible return value of nil from c-get-fallback-scan-pos (as
above).
(c-invalidate-state-cache-1): For `c-state-cache-good-pos', instead of
sometimes using the minimum scan pos (leading to extensive scanning of the
entire buffer) use a point close to `here'.

3 years agoAdd some admin/emake comments
Lars Ingebrigtsen [Mon, 14 Dec 2020 18:54:29 +0000 (19:54 +0100)]
Add some admin/emake comments

3 years agoMake the emake error messages red
Gregory Heytings [Mon, 14 Dec 2020 18:49:39 +0000 (19:49 +0100)]
Make the emake error messages red

* admin/emake: Colorize error messages.

3 years agoAdd 'remote-file-error' for Tramp
Michael Albinus [Mon, 14 Dec 2020 18:30:01 +0000 (19:30 +0100)]
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.

3 years agoImprove accuracy of scrolling commands
Eli Zaretskii [Mon, 14 Dec 2020 18:23:24 +0000 (20:23 +0200)]
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)

3 years agoMake XEmacs entry in the FAQ more contemporary
Stefan Kangas [Mon, 14 Dec 2020 18:21:28 +0000 (19:21 +0100)]
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)

3 years agoFix point location when completing in gdb-mi.el
Eli Zaretskii [Mon, 14 Dec 2020 18:09:04 +0000 (20:09 +0200)]
Fix point location when completing in gdb-mi.el

* lisp/progmodes/gdb-mi.el (def-gdb-auto-update-handler): Don't
force window-start position, so that redisplay doesn't move point
when popping completion window below the GUD one.  (Bug#45052)

3 years agoFix logic of gnus-search-imap-handle-date
Eric Abrahamsen [Fri, 11 Dec 2020 03:52:00 +0000 (19:52 -0800)]
Fix logic of gnus-search-imap-handle-date

* lisp/gnus/gnus-search.el (gnus-search-imap-handle-date): Just
rewrite this whole ridiculous function.

3 years ago* lisp/play/5x5.el: Fix typo. Remove redundant :group args.
Stefan Kangas [Mon, 14 Dec 2020 17:08:20 +0000 (18:08 +0100)]
* lisp/play/5x5.el: Fix typo.  Remove redundant :group args.

3 years ago* etc/emacs.service:
Tim Ruffing [Mon, 14 Dec 2020 16:59:58 +0000 (17:59 +0100)]
* 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

3 years agoMention how to handle user names with @ in rmail
Robert Thorpe [Mon, 14 Dec 2020 16:51:25 +0000 (17:51 +0100)]
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

3 years agoMake goto-char offer the number at point as default
Daniel Martín [Mon, 14 Dec 2020 16:16:00 +0000 (17:16 +0100)]
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).

3 years agoTool bar documentation clarification: Mention forcing updates
Lars Ingebrigtsen [Mon, 14 Dec 2020 16:07:41 +0000 (17:07 +0100)]
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).

3 years agoFix narrow-to-defun in python-mode
Tomas Nordin [Mon, 14 Dec 2020 15:58:07 +0000 (16:58 +0100)]
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

3 years agoAdd a new recursively bound `current-minibuffer-command' variable
Lars Ingebrigtsen [Mon, 14 Dec 2020 15:44:00 +0000 (16:44 +0100)]
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.

3 years agoAdd a DirectoryMode to the Emacs Server example
Ulrich Ölmann [Mon, 14 Dec 2020 15:02:54 +0000 (16:02 +0100)]
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

3 years agoUpdate value of frame-title-format in FAQ
Stefan Kangas [Mon, 14 Dec 2020 15:23:51 +0000 (16:23 +0100)]
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.

3 years agoDon't recommend setnu and wb-line-number
Stefan Kangas [Mon, 14 Dec 2020 15:22:22 +0000 (16:22 +0100)]
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.

3 years agoRemove more references to old versions from FAQ
Stefan Kangas [Mon, 14 Dec 2020 14:48:38 +0000 (15:48 +0100)]
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.

3 years agoMake XEmacs compat variable warning-level-aliases obsolete
Stefan Kangas [Mon, 14 Dec 2020 14:16:13 +0000 (15:16 +0100)]
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.

3 years agoPrefer setq to set+quote
Stefan Kangas [Mon, 14 Dec 2020 14:09:14 +0000 (15:09 +0100)]
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.

3 years ago* lisp/bookmark.el: Doc fix.
Stefan Kangas [Mon, 14 Dec 2020 13:52:46 +0000 (14:52 +0100)]
* lisp/bookmark.el: Doc fix.

3 years ago; * lisp/progmodes/project.el (project-switch-use-entire-map): Typo
Mattias Engdegård [Mon, 14 Dec 2020 11:31:54 +0000 (12:31 +0100)]
; * lisp/progmodes/project.el (project-switch-use-entire-map): Typo

3 years agoMerge branch 'feature/integration-of-dictionary-el'
Torsten Hilbrich [Mon, 14 Dec 2020 11:09:41 +0000 (12:09 +0100)]
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

3 years ago* lisp/net/dictionary.el (dictionary-pre-buffer): Unify casing feature/integration-of-dictionary-el
Torsten Hilbrich [Mon, 14 Dec 2020 10:44:12 +0000 (11:44 +0100)]
* 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.

3 years ago* etc/NEWS: Add entry for dictionary.el
Torsten Hilbrich [Mon, 14 Dec 2020 10:31:51 +0000 (11:31 +0100)]
* etc/NEWS: Add entry for dictionary.el

3 years agoA number of docstring fixes
Torsten Hilbrich [Mon, 14 Dec 2020 10:09:22 +0000 (11:09 +0100)]
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

3 years agoA number of docstring fixes
Torsten Hilbrich [Mon, 14 Dec 2020 09:55:35 +0000 (10:55 +0100)]
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)

3 years ago* lisp/net/dictionary.el (dictionary-display-more-info): Spelling fix
Torsten Hilbrich [Mon, 14 Dec 2020 08:52:23 +0000 (09:52 +0100)]
* lisp/net/dictionary.el (dictionary-display-more-info): Spelling fix

Fix the spelling in the error message for non-existing dictionary.

3 years agoUse when where else case returns nil
Torsten Hilbrich [Mon, 14 Dec 2020 08:48:26 +0000 (09:48 +0100)]
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.

3 years ago* lisp/net/dictionary.el (dictionary-tooltip-mode): Use setq-local
Torsten Hilbrich [Mon, 14 Dec 2020 08:40:33 +0000 (09:40 +0100)]
* lisp/net/dictionary.el (dictionary-tooltip-mode): Use setq-local

3 years ago* lisp/net/dictionary.el (dictionary-mode): Use setq-local
Torsten Hilbrich [Mon, 14 Dec 2020 08:40:33 +0000 (09:40 +0100)]
* lisp/net/dictionary.el (dictionary-mode): Use setq-local

3 years ago* lisp/net/dictionary.el: Prefer defsubst over defmacro
Torsten Hilbrich [Mon, 14 Dec 2020 08:34:44 +0000 (09:34 +0100)]
* lisp/net/dictionary.el: Prefer defsubst over defmacro

3 years ago* lisp/net/dictionary-connection.el: Prefer defsubst
Torsten Hilbrich [Mon, 14 Dec 2020 08:31:28 +0000 (09:31 +0100)]
* 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.

3 years agoUpdate GPL version
Torsten Hilbrich [Thu, 19 Nov 2020 20:50:50 +0000 (21:50 +0100)]
Update GPL version

* lisp/net/dictionary.el: Use GPL version 3 or later
* lisp/net/dictionary-connection.el: Use GPL version 3 or later

3 years ago* lisp/net/dictionary-connection.el: Remove obsolete Version
Torsten Hilbrich [Thu, 19 Nov 2020 20:49:18 +0000 (21:49 +0100)]
* lisp/net/dictionary-connection.el: Remove obsolete Version

3 years ago* lisp/net/dictionary-connection.el: Add lexical-binding:t
Torsten Hilbrich [Thu, 19 Nov 2020 20:48:29 +0000 (21:48 +0100)]
* lisp/net/dictionary-connection.el: Add lexical-binding:t

3 years agoShow error message when asking to match for nothing
Torsten Hilbrich [Thu, 19 Nov 2020 20:45:25 +0000 (21:45 +0100)]
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.

3 years agoRemoved useless check for popup-menu
Torsten Hilbrich [Thu, 19 Nov 2020 20:40:45 +0000 (21:40 +0100)]
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

3 years ago* lisp/net/dictionary.el: Add lexical-binding:t
Torsten Hilbrich [Thu, 19 Nov 2020 20:39:10 +0000 (21:39 +0100)]
* lisp/net/dictionary.el: Add lexical-binding:t

Fixing all the issues found by this. A number of unused variables were
reported here.

3 years agoNew option tab-bar-history-buttons-show
Gabriel do Nascimento Ribeiro [Sun, 13 Dec 2020 18:35:46 +0000 (15:35 -0300)]
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

3 years agoAllow creating a new tab for tab-switcher from the minibuffer (bug#45072)
Juri Linkov [Mon, 14 Dec 2020 08:52:05 +0000 (10:52 +0200)]
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.

3 years agoDon't show matches with no input for nil icomplete-show-matches-on-no-input
Juri Linkov [Mon, 14 Dec 2020 08:44:04 +0000 (10:44 +0200)]
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.

3 years agoInhibit quit in ElDoc timer functions (bug#45117)
João Távora [Sun, 13 Dec 2020 23:08:42 +0000 (23:08 +0000)]
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 12e922156c86a26fa4bb2cb9e7d2b3fd639e4707
    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.

3 years agoUpdate to Org 9.4.2
Bastien Guerry [Sun, 13 Dec 2020 21:26:51 +0000 (22:26 +0100)]
Update to Org 9.4.2

Mostly fixing compiler warnings.

3 years agoRemove the duplication from project-switch-commands's config
Dmitry Gutov [Sun, 13 Dec 2020 20:50:46 +0000 (22:50 +0200)]
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>
3 years agoByte compilation: handle case where the output file is a mountpoint.
Philipp Stephani [Sun, 13 Dec 2020 16:13:50 +0000 (17:13 +0100)]
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.

3 years agoStop dropping the tag when creating the custom-variable widget
Mauro Aranda [Sun, 13 Dec 2020 13:44:30 +0000 (10:44 -0300)]
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)

3 years agoMake dired-toggle-read-only query on read-only directories
Lars Ingebrigtsen [Sun, 13 Dec 2020 13:17:55 +0000 (14:17 +0100)]
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).

3 years agoClarify Extended Menu Items a bit more
Lars Ingebrigtsen [Sun, 13 Dec 2020 12:49:25 +0000 (13:49 +0100)]
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).

3 years agoUpdate to Org 9.4.1
Bastien Guerry [Sun, 13 Dec 2020 12:44:15 +0000 (13:44 +0100)]
Update to Org 9.4.1

3 years ago* Fix `memory-report' for '--without-x' builds
Andrea Corallo [Sun, 13 Dec 2020 00:11:56 +0000 (01:11 +0100)]
* 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.

3 years agoBump project.el version
Dmitry Gutov [Sun, 13 Dec 2020 02:12:35 +0000 (04:12 +0200)]
Bump project.el version

* lisp/progmodes/project.el: Bump the version.

3 years agovc-create-tag: use vc-revision-history variable
Andrii Kolomoiets [Fri, 11 Dec 2020 13:55:22 +0000 (15:55 +0200)]
vc-create-tag: use vc-revision-history variable

* lisp/vc/vc.el (vc-create-tag): Use 'vc-revision-history' variable.

3 years agoFix test failure
Dmitry Gutov [Sun, 13 Dec 2020 01:58:32 +0000 (03:58 +0200)]
Fix test failure

* test/lisp/vc/vc-tests.el (vc-test--working-revision):
Accept working revision -1, expected for older Hg (bug#36534).

3 years ago* lisp/emacs-lisp/bytecomp.el: Allow a nil destination file
Stefan Monnier [Sun, 13 Dec 2020 00:19:03 +0000 (19:19 -0500)]
* 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.

3 years agoFix assertion on SVG load failure
Alan Third [Sat, 12 Dec 2020 23:52:00 +0000 (23:52 +0000)]
Fix assertion on SVG load failure

* src/image.c (svg_load_image): Move setting DPI to after rsvg_handle
error checking.

3 years agoRemove references to Emacs before version 22 from FAQ
Stefan Kangas [Sat, 12 Dec 2020 22:51:30 +0000 (23:51 +0100)]
Remove references to Emacs before version 22 from FAQ

* doc/misc/efaq.texi (Escape sequences in shell output): Remove
reference to versions before Emacs 21.
(Basic editing, Latest version of Emacs)
(Turning on abbrevs by default, Going to a line by number)
(Security risks with Emacs): Remove references to versions before
Emacs 22.

3 years agoDocument and enforce some properties for strings created by modules.
Philipp Stephani [Sat, 12 Dec 2020 22:21:18 +0000 (23:21 +0100)]
Document and enforce some properties for strings created by modules.

When creating multibyte or unibyte strings, we should guarantee the
following invariants:

- When creating empty strings, a NULL data pointer should be allowed.
  This often arises in practice if the string length isn't known in
  advance, and we don't want to unnecessarily trigger undefined
  behavior.  Since functions like memcpy might not accept NULL
  pointers, use the canonical empty string objects in this case.

- Nonzero strings should be guaranteed to be unique and mutable.
  These are the same guarantees expected from Lisp functions such as
  'make-string' or 'unibyte-string'.  On the other hand, empty strings
  might not be unique.

* src/emacs-module.c (module_make_string)
(module_make_unibyte_string): Correctly handle empty strings.

* test/src/emacs-module-resources/mod-test.c (Fmod_test_make_string):
New test function.
(emacs_module_init): Expose it.

* test/src/emacs-module-tests.el (mod-test-make-string/empty)
(mod-test-make-string/nonempty): New unit tests.

* doc/lispref/internals.texi (Module Values): Document properties and
corner cases for strings.

3 years agoFix BSD .include etc syntax in Makefiles
Lars Ingebrigtsen [Sat, 12 Dec 2020 20:59:08 +0000 (21:59 +0100)]
Fix BSD .include etc syntax in Makefiles

* lisp/progmodes/make-mode.el (makefile-bsdmake-statements): Fix
the BSD conditional syntax (bug#24000).
(makefile-make-font-lock-keywords): Allow calling without keywords.
(makefile-bsdmake-font-lock-keywords): Add the conditional syntax.

     Makefile inclusion, conditional structures and for loops reminiscent of
     the C programming language are provided in make.  All such structures are
     identified by a line beginning with a single dot (`.') character.
     Whitespace characters may follow this dot, e.g.,

           .include <file>
     and
           .   include <file>

     are identical constructs

3 years agoBind `C-c C-d' to rmail-epa-decrypt in rmail
Lars Ingebrigtsen [Sat, 12 Dec 2020 20:19:26 +0000 (21:19 +0100)]
Bind `C-c C-d' to rmail-epa-decrypt in rmail

* doc/emacs/rmail.texi (Rmail Display): Mention the key
binding (bug#25411).

* lisp/mail/rmail.el (rmail-mode-map): Bind C-c C-d to
rmail-epa-decrypt.
(rmail-mode): Mention it.
(rmail-epa-decrypt): Don't mark a mail as decrypted unless we're
replacing it.

* lisp/mail/rmailsum.el (rmail-summary-mode-map): Bind C-c C-d.
(rmail-summary-epa-decrypt): New command.

3 years agoNew option gnus-registry-register-all
Eric Abrahamsen [Thu, 3 Dec 2020 23:58:57 +0000 (15:58 -0800)]
New option gnus-registry-register-all

* lisp/gnus/gnus-registry.el (gnus-registry-register-all): If nil,
the registry won't automatically create new entries for all seen
messages. Defaults to t to preserve previous behavior.
(gnus-registry-handle-action): Don't automatically create entries; if
one doesn't exist, don't handle anything.
(gnus-registry-register-message-ids): Only register if this option is
t.
(gnus-registry-get-or-make-entry): Add optional no-create argument.
(gnus-registry-get-id-key): This "get" operation should only create an
entry if this option is t.
* doc/misc/gnus.texi: Documentation and news.

3 years ago* lisp/emacs-lisp/package.el (package-buffer-info): Improve error message
Stefan Monnier [Sat, 12 Dec 2020 16:50:00 +0000 (11:50 -0500)]
* lisp/emacs-lisp/package.el (package-buffer-info): Improve error message

(package-strip-rcs-id): Return canonicalized version string.

3 years ago* src/fns.c (hash_string): Tweak the code further
Stefan Monnier [Sat, 12 Dec 2020 15:59:50 +0000 (10:59 -0500)]
* src/fns.c (hash_string): Tweak the code further

Merge the two main branches; remove the `max` test and thus reduce
the "most steps" to 8 as written

3 years ago* lisp/vc/log-edit.el: Keep separator line thin even with line-numbers
Stefan Monnier [Sat, 12 Dec 2020 15:37:42 +0000 (10:37 -0500)]
* lisp/vc/log-edit.el: Keep separator line thin even with line-numbers

(log-edit-font-lock-keywords): Disable line-number display on
the thin separator line.
(log-edit-mode): Adjust `font-lock-extra-managed-props` accordingly.
(log-edit-changelog-entries): Don't use a nil buffer-local
`change-log-default-name`.

3 years agoFollowup to recent changes in keyboard.c
Eli Zaretskii [Sat, 12 Dec 2020 15:32:55 +0000 (17:32 +0200)]
Followup to recent changes in keyboard.c

* src/keyboard.c (prev_kbd_event): Now defined only if HAVE_X11.

* lisp/subr.el (while-no-input-ignore-events): Remove
'buffer-switch': no longer used or defined.  (Bug#5803)

3 years agoRemove some unused process.c variables
Lars Ingebrigtsen [Sat, 12 Dec 2020 15:24:12 +0000 (16:24 +0100)]
Remove some unused process.c variables

* src/process.c (wait_reading_process_output): Remove some
variables that are unused after the previous patch.

3 years agoNew variable `redisplay_adhoc_scroll_in_resize_mini_windows`
Stefan Monnier [Sat, 12 Dec 2020 15:16:42 +0000 (10:16 -0500)]
New variable `redisplay_adhoc_scroll_in_resize_mini_windows`

* src/xdisp.c (syms_of_xdisp): Define it.
(resize_mini_window): Obey it.

3 years ago* src/keyboard.c: Fix bug#5803.
Stefan Monnier [Sat, 12 Dec 2020 14:56:04 +0000 (09:56 -0500)]
* src/keyboard.c: Fix bug#5803.

A long time ago, `read_key_sequence` used to read the keymaps at the
start, so if something happened between this start and the moment
the user actually hits a key, `read_key_sequence` could end up using
the wrong keymaps.  To work around this problem, the code used
`record_asynch_buffer_change` to try and trigger `read_key_sequence`
to re-read the keymaps in some known cases.

Several years ago, `read_key_sequence` was changed so as to read the keymaps
only once the user hits a key, making this machinery now redundant
(and also harmful apparently in bug#5803 because it introduces
"spurious" events).

So we here remove `record_asynch_buffer_change` and the
`BUFFER_SWITCH_EVENT` and `Qbuffer_switch` pseudo-events it generated.

* src/termhooks.h (enum event_kind): Delete `BUFFER_SWITCH_EVENT`.
* src/keyboard.c: (record_asynch_buffer_change): Delete function.
(syms_of_keyboard): Delete `Qbuffer_switch`.
(force_auto_save_soon, readable_events)
(kbd_buffer_store_buffered_event, kbd_buffer_get_event)
(make_lispy_event):
* src/xterm.c (handle_one_xevent):
* src/w32term.c (w32_read_socket):
* src/process.c (wait_reading_process_output)
(read_and_dispose_of_process_output, exec_sentinel): Simplify accordingly.

3 years agoCC Mode: Handle several K&R parameters per declaration
Alan Mackenzie [Sat, 12 Dec 2020 14:38:38 +0000 (14:38 +0000)]
CC Mode: Handle several K&R parameters per declaration

This fixes bug #45160.

* lisp/progmodes/cc-engine.el (c-in-knr-argdecl): Reformulate the latter part
of this function using c-do-declarators.

3 years agoAlter the "Redundant pcase patter" warning message
Lars Ingebrigtsen [Sat, 12 Dec 2020 13:22:58 +0000 (14:22 +0100)]
Alter the "Redundant pcase patter" warning message

* lisp/emacs-lisp/pcase.el (pcase--expand): Make the "Redundant
pcase pattern" warning less vague (bug#31350).

3 years agoMake elint load `require'd packages
Lars Ingebrigtsen [Sat, 12 Dec 2020 13:13:32 +0000 (14:13 +0100)]
Make elint load `require'd packages

* lisp/emacs-lisp/elint.el (elint-require-form): New function to
load files that are `require'd (bug#27006).
(elint-special-forms): Add function.

3 years ago; * lisp/info.el (Info-toc-build): Fix last change. (Bug#28074)
Eli Zaretskii [Sat, 12 Dec 2020 13:05:26 +0000 (15:05 +0200)]
; * lisp/info.el (Info-toc-build): Fix last change.  (Bug#28074)

3 years agoExplicitly specify svg base_uri using `:base-uri' image property
Zajcev Evgeny [Thu, 3 Dec 2020 15:37:18 +0000 (18:37 +0300)]
Explicitly specify svg base_uri using `:base-uri' image property

* src/image.c (svg_load): Check `:base-uri' image property to
explicitly set base_uri for images embedded into SVG
(enum svg_keyword_index):
(svg_format): Add :base-uri.
* lisp/svg.el (svg-embed-base-uri-image): New function to embed images
located relative to images `:base-uri'

3 years agoRevert "Explicitly specify svg base_uri using `:base-uri' image property"
Alan Third [Sat, 12 Dec 2020 12:30:57 +0000 (12:30 +0000)]
Revert "Explicitly specify svg base_uri using `:base-uri' image property"

This reverts commit a8e2143a5c03785742464406306fda7fce6caf04.

I applied the incorrect version of the patch.

3 years agoOffer to save tutorial position on Emacs exit
Lars Ingebrigtsen [Sat, 12 Dec 2020 12:46:33 +0000 (13:46 +0100)]
Offer to save tutorial position on Emacs exit

* lisp/tutorial.el (tutorial--buffer): New variable (bug#27998).
(tutorial--save-on-kill): Use it.
(help-with-tutorial): Set it and add new function to
kill-emacs-query-functions.

3 years agoUpdate Info-toc-build parsing
Lars Ingebrigtsen [Sat, 12 Dec 2020 12:33:09 +0000 (13:33 +0100)]
Update Info-toc-build parsing

* lisp/info.el (Info-toc-build): Update to understand EMDASH
instead of a hyphen in the detailed node listing (bug#28074).