1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-21 05:00:47 -08:00
Commit graph

143783 commits

Author SHA1 Message Date
Mattias Engdegård
88f5530a9b ERT: escape control characters in pretty-printed error output
* lisp/emacs-lisp/ert.el (ert--pp-with-indentation-and-newline):
Escape control characters which would otherwise be blasted directly to
the terminal (when running noninteractively) with unpleasant results.
2020-10-27 13:20:20 +01:00
Mattias Engdegård
cde72637df Fix sunrise and sunset calculation (bug#44237)
* lisp/calendar/solar.el (solar-moment): Use initial values for binary
search that won't end the loop prematurely and yield incorrect
answers.
* test/lisp/calendar/solar-tests.el: New file.
2020-10-27 12:33:51 +01:00
Mattias Engdegård
f971a612a9 Don't rely on bignums in ntlm.el
Since ntlm.el is distributed as a separate package in GNU ELPA and
should be able to run on older Emacs versions without bignums,
we cannot make use of them here.  See discussion at
https://lists.gnu.org/archive/html/emacs-devel/2020-10/msg01665.html.
Instead, we add a small poor man's bignum implementation.

* lisp/net/ntlm.el (ntlm--bignat-of-int, ntlm--bignat-add)
(ntlm--bignat-shift-left, ntlm--bignat-mul-byte, ntlm--bignat-mul)
(ntlm--bignat-of-string, ntlm--bignat-of-digits)
(ntlm--bignat-to-int64): New.
(ntlm--time-to-timestamp): Use the ntlm--bignat- functions instead
of Lisp integers.
* test/lisp/net/ntlm-tests.el: New file.
2020-10-27 12:25:57 +01:00
Lars Ingebrigtsen
990c0620cb Make edit-abbrevs parsing less brittle
* lisp/abbrev.el (define-abbrevs): Make the parsing less brittle
-- allow more blank lines (bug#42611).
2020-10-27 12:19:41 +01:00
Stefan Kangas
281524943f * lisp/net/sieve-mode.el: Use lexical-binding. 2020-10-27 12:11:45 +01:00
Lars Ingebrigtsen
7d429d7ef0 Add a link to inherited faces in Customize
* lisp/cus-edit.el (cus--face-link): New function (bug#44154).
(face): Use the function to format the link.
2020-10-27 11:32:14 +01:00
Lars Ingebrigtsen
8d3ed5f815 Don't do compilation-transform-file-match-alist if there's no file name
* lisp/progmodes/compile.el (compilation-error-properties): There
may not be a file name (bug#40111).  In that case, don't do the
`compilation-transform-file-match-alist' thing.
2020-10-27 10:17:13 +01:00
Clemens Radermacher
e0de9f3295 Don't skip empty lines when fitting mini frame to buffer (Bug#44080)
* lisp/window.el (fit-mini-frame-to-buffer,
window--resize-mini-frame, fit-frame-to-buffer,
fit-frame-to-buffer-1): By default, fit a mini frame without skipping its
buffer's leading or trailing empty lines.
* src/frame.c (resize-mini-frames): Update doc-string.
* lisp/cus-start.el (resize-mini-frames): Update for customize.
* doc/lispref/minibuf.texi (resize-mini-frames): Update description.
2020-10-27 09:45:25 +01:00
Paul Pogonyshev
083707bbab Don't leak result of nested byte-compilation to outer level
* lisp/emacs-lisp/bytecomp.el (byte-compile-file): Bind
`byte-compiler-error-flag' instead of setting it (bug#41065).
This fixes a problem of "leaking" the flag when compiling
something that then compiles something that errors out (i.e., an
"inner" compile).
2020-10-27 09:43:55 +01:00
mvar
7f32224dc3 Fontify strings in {} better in tcl-mode
* lisp/progmodes/tcl.el (tcl-syntax-propertize-function):
Propertize {} forms after commands as strings (bug#39277).
(tcl-set-font-lock-keywords): Fontify as strings.  This allows
things like puts {"foo} to be fontified correctly.

Copyright-paperwork-exempt: yes
2020-10-27 09:27:51 +01:00
Lars Ingebrigtsen
be2b43c4d6 `g' in *Help* doesn't require confirmation
* lisp/help-mode.el (help-mode-revert-buffer): Don't require
confirmation before reverting (bug#44202).  This mimics how most
other non-file reverting functions work.
2020-10-27 08:23:31 +01:00
Nicolas Graner
eca5f4dec7 Define backtab in text fields in eww
* lisp/net/eww.el (eww-text-map):
(eww-textarea-map): Define backtab, as in the main mode map
(bug#44247).
2020-10-27 08:15:22 +01:00
Eli Zaretskii
d2be9233d1 ; * etc/NEWS: Fix a recent change. 2020-10-27 05:25:17 +02:00
Stefan Kangas
96c6281d56 * lisp/mail/mail-prsvr.el: Use lexical-binding. 2020-10-27 03:53:02 +01:00
Stefan Kangas
8916ea7f98 * lisp/mail/mail-parse.el: Use lexical-binding. 2020-10-27 03:51:57 +01:00
Stefan Kangas
25a57640c5 Allow pcomplete/gzip to complete on files in subdirectories
* lisp/pcmpl-gnu.el (pcmpl-gnu-zipped-files): Allow "gzip" to complete
on files in subdirectories.  (Bug#30271)
2020-10-27 03:09:44 +01:00
Boruch Baum
cfc70e51c2 Add some missing docstrings in cua-rect.el
* lisp/emulation/cua-rect.el (cua--rectangle)
(cua--last-rectangle, cua--restored-rectangle)
(cua--rectangle-overlays, cua--rectangle-operation)
(cua--tabify-start, cua--tabify-start, cua--insert-rectangle):
Add docstrings, in several cases by converting existing
comments.  (Bug#30085)
(cua--last-killed-rectangle): Update comment.
2020-10-27 02:33:51 +01:00
Stefan Kangas
65f36a8471 Use lexical-binding in tool-bar.el
* lisp/tool-bar.el: Use lexical-binding.
(tool-bar-add-item, tool-bar-add-item-from-menu): Quote function
symbols as such.
2020-10-27 01:39:19 +01:00
Stefan Kangas
e679e0abcf Don't use obsolete variable write-contents-hooks
* lisp/mh-e/mh-show.el (mh-display-msg):
* lisp/textmodes/rst.el: Don't use obsolete variable
write-contents-hooks.
Problem reported by Stefan Monnier <monnier@iro.umontreal.ca>.
2020-10-27 00:50:38 +01:00
Stefan Kangas
c00758a4bc Remove XEmacs compat code from hashcash.el
* lisp/mail/hashcash.el (hashcash-point-at-bol)
(hashcash-point-at-eol): Make obsolete.
(hashcash-token-substring): Don't use the above now obsolete aliases.
2020-10-27 00:37:34 +01:00
Stephen Berman
e7009a6dc2 Fix an unbound variable in html skeletons
* lisp/skeleton.el (skeleton-internal-list): Fix an unbound
variable in html skeletons (bug#44157).
2020-10-26 22:21:21 +01:00
Dmitry Gutov
c7a3bd9b56 vc-git-root: Remove unnecessary caching
* lisp/vc/vc-git.el (vc-git-root): Simplify (bug#42966).
2020-10-26 23:01:08 +02:00
Philipp Stephani
a4ec03fa9b ; * etc/tutorials/TUTORIAL.de: Fix grammar (Bug#44246) 2020-10-26 21:38:13 +01:00
Lars Ingebrigtsen
2697123933 Make vc-responsible-backend choose the most specific backend
* lisp/vc/vc.el (vc-responsible-backend): Search through all the
VC backends instead of the first one, and choose the one that's
most specific (bug#42966).
2020-10-26 21:24:47 +01:00
Lars Ingebrigtsen
eb57ae0844 Fix time-test error on machines with mail
* test/lisp/time-tests.el (time-tests-display-time-update): There
may be mail on the machine (bug#44241).
2020-10-26 21:23:55 +01:00
Lars Ingebrigtsen
f314ac2a30 Make the -modes variable autoloaded
* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
Make the -modes variable be autoloaded.
2020-10-26 20:44:21 +01:00
Eli Zaretskii
6415eb8d74 ; * etc/NEWS: Fix a recently-added entry. 2020-10-26 20:38:42 +02:00
Lars Ingebrigtsen
fedb25819a Tweak where global-display-fill-column-indicator-modes is on
* lisp/display-fill-column-indicator.el
(global-display-fill-column-indicator-mode): Don't switch on in
special-mode buffers (bug#44232).
2020-10-26 19:15:36 +01:00
Lars Ingebrigtsen
b8b18cf34a Implement a :predicate parameter for globalized minor modes
* doc/lispref/modes.texi (Defining Minor Modes): Describe the new
:predicate keyword (bug#44232).

* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
Allow a new :predicate keyword.
(easy-mmode--globalized-predicate-p): New function.
2020-10-26 19:15:36 +01:00
Lars Ingebrigtsen
9e8fb4a7cb Make delete-selection-helper more resilient
* lisp/delsel.el (delete-selection-helper): Don't bug out on `C-g'
(bug#40357).
2020-10-26 19:15:36 +01:00
Lars Ingebrigtsen
d23e483cfb Tweak how shortdocs are displayed
* lisp/emacs-lisp/shortdoc.el (shortdoc-example): Removed.
(shortdoc-section): Remove colors.
(shortdoc-separator): New face.
(shortdoc-display-group, shortdoc--display-function): Don't use
background colours, because that makes things harder to read.
Separate with a horizontal line instead.
2020-10-26 19:15:36 +01:00
Eli Zaretskii
1e8f15ee04 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2020-10-26 18:15:37 +02:00
Eli Zaretskii
634bbb61f2 Avoid segfaults due to using fonts that were closed
* src/composite.c (composition_gstring_cache_clear_font): New
function.
* src/composite.h (composition_gstring_cache_clear_font): Add
prototype.
* src/font.c (font_clear_cache): When we are about to close a
font, remove from the gstring cache any lgstring that uses this
font.  (Bug#42943)
2020-10-26 18:14:32 +02:00
Mattias Engdegård
27910f4e96 Revert "Don't consider play-sound-file to be a 'safe' function (bug#44018)"
This reverts commit cdb3c9d662.
2020-10-26 17:10:06 +01:00
Eli Zaretskii
20c02e628c Improve documentation of display-fill-column-indicator
* lisp/display-fill-column-indicator.el
(display-fill-column-indicator-mode): Mention the globalized
version in the doc string.

* doc/emacs/display.texi (Displaying Boundaries): Improve and
clarify the documentation of display-fill-column-indicator.
Suggest using the minor mode as the primary means for turning the
feature on.

* src/xdisp.c (syms_of_xdisp) <display-fill-column-indicator>
<display-fill-column-indicator-character>: Doc fix.  (Bug#44226)
2020-10-26 18:01:13 +02:00
Mattias Engdegård
cdb3c9d662 Don't consider play-sound-file to be a 'safe' function (bug#44018)
While there are currently no known security holes in play-sound-file,
the attack surface is considerable and historically audio file
processing has had more than its share of security problems; the
benefit to risk ratio is low.

* lisp/emacs-lisp/unsafep.el: Don't mark play-sound-file as safe.
2020-10-26 12:40:51 +01:00
Stefan Kangas
a98bb620c4 Add section "Replacing Match" to the regexp shortdoc group
* lisp/emacs-lisp/shortdoc.el (regexp): New section "Replacing Match".
2020-10-25 19:18:27 +01:00
Stefan Kangas
158d2a1f50 Remove some Emacs 19 compat code and references
* lisp/progmodes/sql.el:
* lisp/mh-e/mh-show.el (mh-display-msg): Remove Emacs 19 compat code.
* lisp/emacs-lisp/edebug.el (edebug-mark-marker): Make into
obsolete alias for mark-marker.
(edebug--display-1, edebug-bounce-point)
(edebug-outside-excursion): Adjust callers.
* lisp/net/snmp-mode.el:
* lisp/forms.el: Remove references to Emacs 19.
(forms-use-text-properties): Doc fix.
2020-10-25 18:27:19 +01:00
Eli Zaretskii
8164f3e1ab Improve support for shaping Egyptian Hieroglyphs
* src/composite.c (composition_gstring_lookup_cache): Renamed from
gstring_lookup_cache and made external.  All callers changed.
* src/composite.h (composition_gstring_lookup_cache): Add
prototype.
* src/font.c (Ffont_shape_gstring): Call
composition_gstring_lookup_cache and return the cached composition
if it is already in the cache.

* lisp/language/misc-lang.el (egyptian-shape-grouping): New
function.
(composition-function-table): Use egyptian-shape-grouping in
setting up compositions for Egyptian Hieroglyphs.  Fix the
composition setup for horizontal and vertical joiners.
2020-10-25 18:05:37 +02:00
Mattias Engdegård
7276723630 Better file name in dynvars-check example
* doc/lispref/variables.texi (Converting to Lexical Binding):
Don't suggest an aggregate file name that matches the glob used when
generating it.
2020-10-25 16:41:31 +01:00
Lars Ingebrigtsen
35df337979 Fix syntax error in message-add-openpgp-header
* lisp/gnus/message.el (message-add-openpgp-header): Remove
redundant (and syntactically wrong) check.
2020-10-25 15:16:05 +01:00
Lars Ingebrigtsen
b0a7a19d5d Fix problem when replacing the final char in checkdoc
* lisp/emacs-lisp/checkdoc.el (checkdoc-autofix-ask-replace):
Ensure that the end-of-doc-string marker is really at the end,
even if we replace the final " char in the string (bug#44201).
2020-10-25 14:34:47 +01:00
Michael Albinus
e2005f1f2a * INSTALL: Mention efaq.texi for installation of intlfonts. 2020-10-25 12:44:01 +01:00
Philipp Stephani
e73e7a8bd6 Revert commit 1f44a77672 for XRef.
XRef supports Emacs versions back to Emacs 26.3, so it can’t use newer
functions such as ‘ert-resource-directory’.

* test/lisp/progmodes/xref-tests.el (xref-tests-data-dir): Don’t use
‘ert-resource-directory’
2020-10-25 11:24:11 +01:00
Philipp Stephani
2e090da775 Revert commit 1f44a77672 for Flymake.
Flymake supports all Emacs versions back to 26.1, so it can’t use
‘ert-resource-file’.

* test/lisp/progmodes/flymake-tests.el (flymake-tests-data-directory):
Recreate.
(flymake-tests--call-with-fixture): Stop using ‘ert-resource-file’.
2020-10-25 10:59:11 +01:00
Paul Eggert
71661b2872 Use WebKit sandboxing
* src/xwidget.c (Fmake_xwidget): Enable sandboxing if WebKit 2.26
or later.  Do this early, as required for sandboxing (Bug#43071).
Co-authored-by: Qiantan Hong <qhong@mit.edu>
Copyright-paperwork-exempt: yes
2020-10-24 16:52:49 -07:00
Stefan Kangas
10ea719abc Add shortdoc group for alist
* lisp/emacs-lisp/shortdoc.el (alist): New shortdoc group.
2020-10-25 01:40:52 +02:00
Stefan Kangas
b6a41c76a5 Add shortdoc group for hash-table
* lisp/emacs-lisp/shortdoc.el (hash-table): New shortdoc group.
2020-10-25 00:53:17 +02:00
Paul Eggert
32e427cca1 Minor doprnt cleanup: remove memchr call
* src/doprnt.c (doprnt): Remove unnecessary call to memchr.
2020-10-24 14:00:13 -07:00
Paul Eggert
28d2931b4b Rename doprnt_nul to doprnt_non_null_end
* src/doprnt.c (doprnt_non_null_end): Rename from doprnt_nul,
as the old name was misleading (left over from a previous proposal).
Caller changed.
2020-10-24 14:00:13 -07:00