1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-27 07:41:28 -08:00
Commit graph

144798 commits

Author SHA1 Message Date
Stefan Kangas
a9658cd5b0 Lift {global,local}-key-binding to Lisp
* lisp/subr.el (local-key-binding, global-key-binding): New defuns.
* src/keymap.c (Flocal_key_binding, Fglobal_key_binding): Remove DEFUNs.
(syms_of_keymap): Remove defsubrs for above DEFUNs.
* test/lisp/subr-tests.el (subr-test-local-key-binding)
(subr-test-global-key-binding): New tests.
2021-01-13 18:54:09 +01:00
Stefan Kangas
be9b7e83bc Prefer skip-unless in more tests
* test/lisp/emacs-lisp/timer-tests.el (timer-tests-debug-timer-check):
* test/src/decompress-tests.el (zlib--decompress):
* test/src/xml-tests.el (libxml-tests): Prefer skip-unless.
2021-01-13 17:39:53 +01:00
Eli Zaretskii
19b169c4e2 Fix 'visual-line-mode' when 'word-wrap-by-category' is in effect
* src/xdisp.c (move_it_in_display_line_to): Don't reset
next_may_wrap after saving a potential wrap point.  This fixes the
case where several characters in a row can serve as a wrap point.
(Bug#45837)
2021-01-13 16:45:31 +02:00
Stefan Kangas
aeb11da203 Use skip-unless instead of if+message in test
* test/lisp/cedet/semantic-utest.el (semantic-utest-Javascript):
Use skip-unless instead of if+message.
2021-01-13 15:23:31 +01:00
Stefan Kangas
118d6ef554 Remove some XEmacs compat code from tests
* test/lisp/cedet/srecode-utest-getset.el
(srecode-utest-getset-output):
* test/lisp/cedet/srecode-utest-template.el
(srecode-utest-template-output): Remove XEmacs compat code.
2021-01-13 15:18:21 +01:00
Stefan Kangas
6d467eb4d1 * lisp/calc/calc.el: Remove some XEmacs compat code. 2021-01-13 15:12:08 +01:00
Mattias Engdegård
820bd0e09a Stabilise lunar-phase-list test (bug#45818)
The test reference data was produced with accidental interference from
the system daylight saving in effect at the time.  Prevent that
from occurring again and correct the data.

* test/lisp/calendar/lunar-tests.el (with-lunar-test):
Switch to UTC and make sure daylight saving adjustment is disabled.
Use normal time presentation for maintainability.
* test/lisp/calendar/lunar-tests.el (lunar-test-phase): Adjust to UTC.
(lunar-test-phase-list): Adjust to UTC with correct times.
Enable the test by removing its :unstable mark.
2021-01-13 14:16:57 +01:00
Mattias Engdegård
c734ba6862 Fix Indian time zone test when run by Irishmen (bug#45818)
* test/lisp/calendar/solar-tests.el (solar-sunrise-sunset):
Inhibit any attempt by confused calendar code to apply daylight saving
correction when Irish time zone settings are in effect.  It's not
entirely clear why this is needed but may be related to the fact that
'IST' stands for both Irish and Indian Standard Time, and that Ireland
uses reversed daylight saving in winter.
2021-01-12 21:48:13 +01:00
Arash Esbati
d93de0b412 ; Update docstring
* lisp/textmodes/reftex-vars.el (reftex-label-regexps): Track the
latest addition of "frame" environment.
2021-01-12 20:42:03 +01:00
Robert Pluim
0f6c083251 Only run IPv6 tests if we have an IPv6 address
* test/src/process-tests.el (ipv6-is-available): New function for
checking whether we have a globally routable IPv6 prefix assigned.
(lookup-family-specification): Use 'ipv6-is-available' to check for
IPv6.  Use 'localhost' instead of 'google.com' to test
'network-lookup-address-info' API.
(lookup-google): Use 'ipv6-is-available' to check for
IPv6.

* test/lisp/net/nsm-tests.el (nsm-ipv6-is-available): Rename to
'ipv6-is-available', make identical to the one in
test/src/process-tests.el.
2021-01-12 18:53:48 +01:00
Robert Pluim
6dc4fc7d62 Fix nsm-should-check for "google.com" failure
* lisp/net/nsm.el (nsm-should-check): Extract the mask from
'network-interface-list' rather than the broadcast
address (Bug#45798).
2021-01-12 18:53:48 +01:00
Lars Ingebrigtsen
792ba7196f Add a new function 'buffer-line-statistics'
* src/fns.c (Fbuffer_line_statistics): New function.
2021-01-12 18:43:53 +01:00
Lars Ingebrigtsen
ca024b0575 Add a new variable `inhibit-interaction'
* doc/lispref/elisp.texi (Top): Add a link.
* doc/lispref/errors.texi (Standard Errors): Mention the new error.

* doc/lispref/minibuf.texi (Minibuffers): Add a link.
(Inhibiting Interaction): New node.

* src/data.c (syms_of_data): Define the `inhibited-interaction' error.

* src/lisp.h: Export the barfing function.

* src/lread.c (Fread_char, Fread_event, Fread_char_exclusive):
Barf if inhibited.

* src/minibuf.c (barf_if_interaction_inhibited): New function.
(Fread_from_minibuffer, Fread_no_blanks_input): Barf if inhibited.
(syms_of_minibuf): Define the `inhibit-interaction' variable.
2021-01-12 15:12:38 +01:00
Glenn Morris
d191f1589b Update substitute-command-keys tests, again
* test/lisp/help-tests.el (help-tests-substitute-command-keys/keymaps)
(help-tests-substitute-command-keys/keymap-change):
Update following recent minibuffer changes.
2021-01-12 05:41:13 -08:00
Brian Leung
78ef0a72fa comint-read-input-ring: Simplify last commit
* lisp/comint.el (comint-read-input-ring): It is not necessary to use
  `goto-char' again since we have already moved point to the desired
  location (bug#45797).
2021-01-12 13:29:03 +01:00
Stefan Monnier
d8936322f4 * lisp/emacs-lisp/eieio-base.el: Silence warnings in last change
(eieio-persistent-make-instance): Quote the `eieio-named` class name.
(eieio-named): Move before `eieio-persistent`.
2021-01-11 16:44:39 -05:00
Eric Ludlam
bb4399f647 cedet/ede/auto.el:
(ede-calc-fromconfig): New method.  Support functions in addition to
string matchers.
(ede-dirmatch-installed, ede-do-dirmatch):
Use `ede-calc-fromconfig' to do conversion.
Author: Eric Ludlam <zappo@gnu.org>
2021-01-11 16:20:57 -05:00
Eric Ludlam
002f9dc091 eieio-base.el:
(eieio-persistent-make-instance): Save the backward compatible 'name'
of objects saved in the file, and if the newly loaded class inherits
from 'eieio-named', restore the name of the object.
Author: Eric Ludlam <zappo@gnu.org>
2021-01-11 16:20:57 -05:00
Eric Abrahamsen
fcf8ad610d Fix possible prepending of "TEXT" to IMAP searches
* lisp/gnus/gnus-search.el (gnus-search-imap-search-keys): Add missing
keys "old", "new", "or" and "not".
(gnus-search-run-search): In addition, don't touch the query if it
starts with a parenthesis. Consider just getting rid of this
convenience altogether.
2021-01-11 09:48:50 -08:00
Stephen Leake
1aa36d968c * admin/notes/elpa: Update to match recent Gnu ELPA changes 2021-01-11 09:18:31 -08:00
Lars Ingebrigtsen
00908e052a Mark previous erc-services change as not needing documentation 2021-01-11 17:06:11 +01:00
Brian Leung
d0d5e40a5d Make comint-read-input-ring skip uninteresting text in .zsh_history
* lisp/comint.el (comint-read-input-ring): Simplify (bug#45606).
* lisp/shell.el (shell-mode): Add "~/.zsh_history".
* lisp/comint.el (comint-read-input-ring): Bind
`comint-input-ring-file-prefix' in anticipation of a buffer switch.
* lisp/comint.el (comint-read-input-ring): Skip the separator.

Because re-search-backward moves point to the beginning of the match,
and since we don't want the separator appearing in the output, we skip
over it.

This is required to properly detect instances of the value that zsh
uses for `comint-input-ring-file-prefix'; if the
`comint-input-ring-file-prefix' is ':potato', the subsequent
invocation `looking-at' sees '\n:potato' for all entries after the one
at the very beginning of the history file.
2021-01-11 16:42:03 +01:00
Anticrisis
26ed7c7345 Add a failing test for bug#44834
* test/lisp/progmodes/tcl-tests.el (tcl-mode-namespace-indent-2):
New, failing test (bug#44834).
(tcl-mode-function-name-2):
(tcl-mode-function-name-3): Fix names of the tests so that they're
actually run.

Copyright-paperwork-exempt: yes
2021-01-11 16:16:50 +01:00
Leon Vack
42e72f4ade Support using auth-source for NickServ passwords in ERC
* lisp/etc/erc-services.el (erc-nickserv-passwords): Document that
the passwords are only used when erc-prompt-for-nickserv-password
is nil.
* (erc-use-auth-source-for-nickserv-password): New customizable
variable to enable checking auth-source for NickServ passwords.
* (etc-nickserv-get-password): New function to handle the lookup
of the NickServ password from both auth-source and the
erc-nickserv-passwords variable.
* (erc-nickserv-call-identify-function): Use new
erc-nickserv-get-password function to lookup NickServ passwords.
* (erc-nickserv-identify-autodetect, erc-nickserv-identify-on-connect,
erc-nickserv-identify-on-nick-change): Call
erc-nickserv-call-identify-function when
erc-use-auth-source-for-nickserv-password is set.
* etc/NEWS: Document change (bug#45340).
2021-01-11 15:51:14 +01:00
Alexandre Duret-Lutz
6129ebf449 Fix problem with non-ASCII characters in nnmaildir
* lisp/gnus/nnmaildir.el (nnmaildir-request-article): Enable
multipart 8bit-content-transfer-encoded files to be displayed
correctly by reading as `raw-text' instead of having Emacs
(incorrectly) decode the files (bug#44307).

Copyright-paperwork-exempt: yes
2021-01-11 15:27:54 +01:00
Pedro Andres Aranda Gutierrez
e694f61fc6 Add `flat-button' to custom-face-attributes
* lisp/cus-face.el (custom-face-attributes): Add `flat-button'
(bug#45769).
2021-01-11 15:07:01 +01:00
Robert Pluim
ef55cc07ba * configure.ac: Alphabetize emacs_config_features 2021-01-11 13:20:04 +01:00
Robert Pluim
62e3750af3 Ensure HAVE_GMP is reflected in emacs_config_features
* configure.ac: Move HAVE_GMP setting before emacs_config_features
setting (Bug#45771).
2021-01-11 13:11:51 +01:00
Dmitry Gutov
17bd039539 New command xref-quit-and-pop-marker-stack
* lisp/progmodes/xref.el (xref-quit-and-pop-marker-stack):
New command.
(xref--xref-buffer-mode-map): Binding for it.
2021-01-11 00:45:21 +02:00
Phillip Lord
fb32f92879 Allow evaluation of tests from local source repository
* etc/w32-feature.el (w32-feature-load-tests): Add new command
2021-01-10 21:51:58 +00:00
Philipp Stephani
45abd52f3c Fix build breakage if Lisp_Object is not a primitive type.
* src/minibuf.c (choose_minibuf_frame): Don't compare Lisp_Objects
with '!='.  Use 'EQ' instead.
2021-01-10 22:35:02 +01:00
Philipp Stephani
94344d130c Add functions to open a file without quitting.
In some situations, e.g. when the Lisp machinery isn't available, we
can't quit.  Don't check the quit flags in such situations, in case
they contain garbage.

* src/sysdep.c (emacs_open_noquit, emacs_openat_noquit): New variants
of 'emacs_open' and 'emacs_openat' that don't check the quit flags.

* src/emacs.c (main, Fdaemon_initialized):
* src/pdumper.c (pdumper_load):
* src/w32term.c (w32_initialize):
* src/buffer.c (mmap_init):
* src/callproc.c (emacs_spawn): Use them where we can't quit.
2021-01-10 22:31:22 +01:00
Alan Mackenzie
c7c154bb57 Fix incompleteness in the implementation of minibuffer-follows-selected-frame
In particular, add a new value to the variable, and fix several bugs apparent
with the implementation up till now.

* doc/emacs/mini.texi (Basic Minibuffer): Add a description of the new
non-nil, non-t value of minibuffer-follows-selected-frame.

* doc/emacs/trouble.texi (Quitting): Add a description of how C-g handles
recursive minibuffers when typed in one which isn't the most nested.

* doc/lispref/minibuf.texi (Intro to Minibuffers): Add an @dfn for "active
minibuffer".
(Minibuffer Commands): Document that exit-minibuffer throws an error when not
invoked from the innermost Minibuffer.
(Recursive Mini): Amend the description of the visibility of outer level
minibuffers.
(Minibuffer Misc): In the description of the minibuffer hooks, replace "the
minibuffer" with "a minibuffer".

* etc/NEWS (Entry announcing minibuffer-follows-selected-frame): Add a
description of the new non-nil, non-t value.

* lisp/cus-start.el (top level): make the customize entry for
minibuffer-follows-selected-frame a choice between three entries.

* lisp/minibuffer.el (exit-minibuffer): throw an error when we're not in the
most nested minibuffer.
(top level): Bind C-g to abort-minibuffers in minibuffer-local-map.

* lisp/window.el (window-deletable-p): return the symbol `frame' when (amongst
other things) minibuffer-follows-selected-frame is t.

* src/eval.c (internal_catch): Add a mechanism to (throw 'exit t) repeatedly
when the throw currently being processed doesn't terminate the current
minibuffer.

* src/lisp.h (this_minibuffer_depth): New extern declaration
(minibuf_level): extern declaration moved here from window.h.

* src/minibuf.c (minibuffer_follows_frame, minibuf_stays_put)
(minibuf_moves_frame_when_opened): New and amended functions to query the
value of minibuffer-follows-selected-frame.
(choose_minibuf_frame): check (minibuf > 1) in place of (minibufer > 0) at a
particular place.  At another place, check that an alleged frame is so and is
live.  Before selecting a non-miniwindow on a different frame, ensure it
really is a different frame.
(move_minibuffer_onto_frame): Stack up all recursive minibuffers on the target
frame.  Check the minibuf_window isn't in the old frame before setting that
frame's miniwindow to an inactive minibuffer.
(Finnermost_minibuffer_p, Fabort_minibuffers): New primitives.
(this_minibuffer_depth): New function.
(read_minibuf): Record the calling frame in a variable, and switch back to it
after the recursive edit has terminated normally, using
select-frame-set-input-focus.  Stack up all the recursive minibuffers on the
miniwindow where a new minibuffer is being opened.  After the recursive edit,
switch the selected window away from the expired minibuffer's window.
(nth_minibuffer): New function.
(minibuffer-follows-selected-frame): Change from a DEFVAR_BOOL to a
DEFVAR_LISP.

* src/window.c (decode_next_window_args): Set *minibuf to w's mini-window's
content when that content is a minibuffer.

* src/window.h (minibuf_level) Declaration moved from here to lisp.h.
2021-01-10 20:32:40 +00:00
Lars Ingebrigtsen
a583c72305 Respect message-forward-ignored-headers more
* lisp/gnus/message.el (message-forward-ignored-headers): Clarify
doc string once again.
(message-forward-make-body-mime): Remove headers when not
encrypted (bug#45631).
(message-forward-make-body): Pass in correct values.
2021-01-10 16:16:42 +01:00
Glenn Morris
fa686f0998 Default python-shell-interpreter to python3
* lisp/progmodes/python.el (python-shell-interpreter): Default to
python3 (bug#45655).
2021-01-10 15:48:57 +01:00
David Edmondson
6858b74763 Fix example in the Gnus manual
* doc/misc/gnus.texi (Score Variables): In the example showing how to
use a list of functions for gnus-score-find-score-files-find-function,
return a list of strings from the lambda rather than trying to call
the string as a function (bug#45673).
2021-01-10 15:45:07 +01:00
Lars Ingebrigtsen
9717ba9309 Specify precedence in .authinfo files
* doc/misc/auth.texi (Help for users): Mention placing more
specific entries first (bug#45711).
2021-01-10 15:32:57 +01:00
Lars Ingebrigtsen
e186af261a Improve fill-region-as-paragraph when there's a fill prefix
* lisp/textmodes/fill.el (fill-region-as-paragraph): Try to
improve how line breaks are set on unbreakable text with a fill
prefix area that has spaces within (bug#45720).
2021-01-10 15:04:48 +01:00
k3tu0isui
918a5eae17 Make font locking work in mercury-mode
* lisp/progmodes/prolog.el (prolog-font-lock-keywords): Work in
all modes derived from prolog-mode (bug#45747).
(mercury-mode): Set up variables based on the Prolog system (bug#45747).

Copyright-paperwork-exempt: yes
2021-01-10 15:04:48 +01:00
Basil L. Contovounesios
25dadca0d1
Hyperlink symbol names without word syntax in Help
* lisp/emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-2)
(lisp-cl-font-lock-keywords-2): Allow single-character symbol names.
* lisp/help-mode.el (help-xref-symbol-regexp): Also match symbol
names starting with symbol syntax (bug#6601, bug#24309).
* test/lisp/help-mode-tests.el (help-mode-tests-xref-button): Test
hyperlink creation for function names without symbol syntax.
2021-01-10 13:37:38 +00:00
Omar Polo
4c55eeee39 Add support for 'process-attributes' on OpenBSD
* src/sysdep.c (make_lisp_timeval):
(system_process_attributes): Implement for OpenBSD (bug#45729).
2021-01-10 14:25:30 +01:00
Basil L. Contovounesios
5960e9cf57
; * lisp/custom.el (defcustom): Fix last change. 2021-01-10 13:20:51 +00:00
Pedro Andres Aranda Gutierrez
13bd909591 Add support for flat buttons
* src/xfaces.c (Finternal_set_lisp_face_attribute):
(realize_gui_face): Add support for `flat-button' (bug#45735).

Copyright-paperwork-exempt: yes
2021-01-10 14:10:18 +01:00
Daniel Martín
e62f71988f Minor shortdoc link improvements
* lisp/emacs-lisp/shortdoc.el (shortdoc--display-function): Use
describe-function as a fallback link when a function is not documented
in any Info manual.  Also make the link respond to mouse-1, like the
rest of *Help* links, and add a proper help-echo property.
* lisp/help-fns.el (help-fns--mention-shortdoc-groups): Same link
improvement as described before, this time for the shortdoc groups
(bug#45750).
2021-01-10 13:45:44 +01:00
Lars Ingebrigtsen
14a1a84a33 Add a link to the manual from the defcustom doc string
* lisp/custom.el (defcustom): Add a link to the manual for the
:type element.
2021-01-10 13:43:12 +01:00
Lars Ingebrigtsen
b84b689746 Revert recent mm-with-part change
* lisp/gnus/mm-decode.el (mm-with-part): Revert
23a887e426 -- this is the wrong
place to handle this peculiarity.
2021-01-10 13:30:31 +01:00
Michael Albinus
2c03bdc887 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2021-01-10 13:27:10 +01:00
Michael Albinus
aa6ee3302f Rework parts of Tramp's insert-directory, bug#45691
* lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory): Fix some
unibyte/multibyte inconsistencies.  (Bug#45691)

* test/lisp/net/tramp-tests.el (tramp-test17-insert-directory-one-file):
New test.
2021-01-10 13:26:29 +01:00
Lars Ingebrigtsen
4ad8fc61e7 Add more mm-decode tests 2021-01-10 13:21:06 +01:00
Stefan Kangas
ac9c4ca8c9 * lisp/subr.el (global-map): Doc fix; add cross-reference. 2021-01-10 12:51:04 +01:00