1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-11 05:51:21 -08:00
Commit graph

142185 commits

Author SHA1 Message Date
Lars Ingebrigtsen
033f98efc3 Remove some compat code from python.el
* lisp/progmodes/python.el: Remove some compat function definitions.
2020-08-18 12:02:58 +02:00
Lars Ingebrigtsen
60f045b893 Remove some compat code from binhex.el and uudecode.el
* lisp/mail/binhex.el (binhex-temporary-file-directory): Make obsolete.
(binhex-decode-region-external): Adjust usage.

* lisp/mail/uudecode.el (uudecode-temporary-file-directory): Make
obsolete.
(uudecode-decode-region-external): Adjust usage.
2020-08-18 12:01:09 +02:00
Lars Ingebrigtsen
848a38adcb Remove some compat code from ispell.el
* lisp/textmodes/ispell.el (ispell-check-version): Remove check
for temporary-file-directory, which is always defined.
2020-08-18 11:57:39 +02:00
Lars Ingebrigtsen
c64fcb8ab5 Remove some compat code from uudecode.el
* lisp/mail/uudecode.el (uudecode-decode-region-external): Remove
check for make-temp-file, which is always defined.
2020-08-18 11:56:39 +02:00
Lars Ingebrigtsen
85f0e3df73 Remove some compat code from ediff-util.el
* lisp/vc/ediff-util.el (ediff-minibuffer-with-setup-hook): Make
into an obsolete macro.
(ediff-read-file-name): Adjust caller.
2020-08-18 11:55:29 +02:00
Lars Ingebrigtsen
8d7a7c16a8 Remove XEmacs compat code from idlwave.el
idlwave.el: (idlwave-comment-line-start-skip, idlwave-mode-map)
(idlwave-mode, idlwave-get-buffer-visiting)
(idlwave-find-file-noselect, idlwave-complete-in-buffer)
(idlwave-attach-classes, idlwave-popup-select)
(idlwave-split-menu-emacs, idlwave-display-completion-list)
(idlwave-default-choose-completion)
(idlwave-display-completion-list-emacs)
(idlwave-display-completion-list-1)
(idlwave-make-modified-completion-map-emacs)
(idlwave-class-file-or-buffer, idlwave-rinfo-mouse-map)
(idlwave-display-calling-sequence)
(idlwave-insert-source-location)
(idlwave-list-load-path-shadows, idlwave-edit-in-idlde): Remove
XEmacs compat code.
2020-08-18 11:53:21 +02:00
Lars Ingebrigtsen
b14c1b5473 Remove some compat code from window.el
* lisp/window.el (window-fixed-size-p): Remove check for
window-size-fixed, which is always defined.
2020-08-18 11:32:06 +02:00
Lars Ingebrigtsen
fdd388d311 Remove some compat code from idlwave.el
* lisp/progmodes/idlwave.el (idlwave-one-key-select): Remove check
from fit-window-to-buffer, which always exists.
2020-08-18 11:27:17 +02:00
Lars Ingebrigtsen
e6e59a349b Remove come compat code from rmailedit.el
* lisp/mail/rmailedit.el (rmail-edit-mode): Remove check for
mode-line-modified, which is always defined.
2020-08-18 11:25:05 +02:00
Lars Ingebrigtsen
128b04fca0 Remove some compat code from erc-track.el
* lisp/erc/erc-track.el (erc-track-remove-from-mode-line)
(erc-track-add-to-mode-line): Remove check for mode-line-modes,
which is always bound.
2020-08-18 11:23:47 +02:00
Paul Eggert
9905001e4b Fix glitch uncovered by gcc -fsanitize=undefined
* src/ccl.c (ccl_driver): Defend against signed integer
overflow (Bug#42660).  Perhaps some of this is unnecessary,
but it is safe and ccl.c is low-priority these days.
2020-08-17 17:55:09 -07:00
Paul Eggert
352b7dede0 Update from Gnulib
This incorporates:
2020-08-17 verify: avoid __built_assume on Clang
2020-08-17 libc-config: avoid Clang’s __diagnose_if__
* lib/cdefs.h, lib/verify.h: Copy from Gnulib.
2020-08-17 15:05:41 -07:00
Eli Zaretskii
a1fe15a6ce Don't use -Wsuggest-attribute=malloc by default
* configure.ac: Move -Wsuggest-attribute=malloc to the set used
only under --enable-gcc-warnings.
2020-08-17 19:43:29 +03:00
Eli Zaretskii
3a17b9f265 Fix assertion violation in pdumper.c
* src/pdumper.c (pdumper_find_object_type_impl): When checking
last_mark_bits, require the offset to be less than
discardable_start, not cold_start.  This fixes a typo introduced in
2020-08-14T21:33:21Z!eggert@cs.ucla.edu (Bug#42832).
2020-08-17 09:30:40 -07:00
Eli Zaretskii
12c9941a35 ; * etc/NEWS: Call out a recent change in 'count-words'. (Bug#41761) 2020-08-17 19:11:35 +03:00
Stefan Kangas
e5d4fae679 Remove some obsolete items from PROBLEMS
* etc/PROBLEMS: Remove some obsolete items.
2020-08-17 13:30:03 +02:00
Stefan Kangas
ddbfbeb067 Remove more XEmacs compat code from viper
* lisp/emulation/viper-util.el (viper-sit-for-short)
(viper-last-command-char): Make obsolete.
(viper-fast-keysequence-p):
* lisp/emulation/viper-cmd.el (viper-escape-to-emacs)
(viper-digit-argument, viper-command-argument, viper-undo)
(viper-exit-minibuffer):
* lisp/emulation/viper-mous.el (viper-multiclick-p):
Adjust callers.
2020-08-17 13:29:48 +02:00
Michael Albinus
2b6f52950d ; * doc/lispref/tips.texi: Fix typo. 2020-08-17 11:41:46 +02:00
Paul Eggert
0c86f5592e Simplify format_time_string
* src/timefns.c (emacs_nmemftime, format_time_string):
Simplify on the basis of recent nstrftime changes.
Propagate nstrftime errno.
2020-08-16 14:30:29 -07:00
Paul Eggert
846657afaf Update from Gnulib
This incorporates:
2020-08-16 time_rz: remove unused functions
2020-08-16 time_rz: fix issues with mktime_z failures
2020-08-16 nstrftime: Guide inlining also on clang
2020-08-16 intprops: Avoid bogus warning on clang
2020-08-16 libc-config: Enable __REDIRECT macro also on clang
2020-08-16 regex: Use initializer shorthand syntax also with clang
2020-08-16 regex: Use space optimization also with clang
2020-08-16 Use _Static_assert and static_assert when present on clang
2020-08-16 Use 'throw ()' for optimization in C++ mode also on clang
2020-08-16 stdio: Don't break attribute 'scanf' on clang
2020-08-16 Fix "warning: 'format' attribute ...: rpl_printf"
2020-08-16 Fix "warning: attribute declaration must precede definition"
2020-08-16 Fix undesired warnings
2020-08-16 Don't use Autoconf quadrigraphsxo
2020-08-16 Fix quoting of AC_LANG_PROGRAM arguments
2020-08-16 Assume autoconf >= 2.64
2020-08-15 nstrftime: be more predictable about errno
2020-08-15 canonicalize: Fix autoconf test on MSVC/clang
2020-08-15 Support compiling without -loldnames on native Windows
2020-08-14 mktime, mktime-internal: Remove obsolete code
2020-08-14 Assume tzset exists
* lib/c++defs.h, lib/canonicalize-lgpl.c, lib/cdefs.h, lib/dup2.c:
* lib/fcntl.in.h, lib/getopt-cdefs.in.h, lib/intprops.h, lib/md5.h:
* lib/mktime.c, lib/nstrftime.c, lib/open.c, lib/regcomp.c:
* lib/regex_internal.h, lib/stdio.in.h, lib/stdlib.in.h:
* lib/strftime.h, lib/string.in.h, lib/sys_select.in.h:
* lib/sys_stat.in.h, lib/sys_time.in.h, lib/time.in.h, lib/time_rz.c:
* lib/unistd.in.h, lib/verify.h, m4/00gnulib.m4:
* m4/absolute-header.m4, m4/alloca.m4, m4/canonicalize.m4, m4/dup2.m4:
* m4/fchmodat.m4, m4/fcntl.m4, m4/fdopendir.m4, m4/fpending.m4:
* m4/futimens.m4, m4/getdtablesize.m4, m4/getloadavg.m4:
* m4/gnulib-common.m4, m4/include_next.m4, m4/largefile.m4:
* m4/manywarnings.m4, m4/mktime.m4, m4/nstrftime.m4, m4/open-slash.m4:
* m4/pselect.m4, m4/pthread_sigmask.m4, m4/time_h.m4, m4/utimens.m4:
* m4/utimensat.m4, m4/utimes.m4, m4/warnings.m4:
Copy from Gnulib.
* lib/gnulib.mk.in: Regenerate.
2020-08-16 14:30:29 -07:00
Jonas Bernoulli
8c68a15f2a Allow overriding read--expression-try-read bindings
* lisp/simple.el (read--expression): No longer bind
read--expression-try-read here.
* lisp/simple.el (read-expression-map): Bind
read--expression-try-read here (bug#42893).

This new specialized command was recently added in [1: 4a6dd13fa4].
It reestablishes the bindings every time `read--expression' is
invoked, which is wrong because it makes it impossible for users
to remove these bindings.

1: 4a6dd13fa4
Change 'M-:' to not error out on incomplete expressions.
2020-08-16 22:24:59 +02:00
Lars Ingebrigtsen
bdda935a7d Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2020-08-16 20:25:53 +02:00
Lars Ingebrigtsen
ada0b9b94e Implement list-system-processes on OpenBSD
* src/sysdep.c: Implement list-system-processes on OpenBSD:
(bug#13881).  Based on a patch by Jérémie Courrèges-Anglas.
2020-08-16 20:25:44 +02:00
João Távora
df2ae3f9c1 Don't let docless variables hide function signature
In Elisp mode, ElDoc will try the variable's docstring first, then the
function signature.  If the former doesn't have one, don't hide the
latter.

* lisp/progmodes/elisp-mode.el (elisp-eldoc-var-docstring): If no
symbol docstring, don't declare any.
2020-08-16 19:05:05 +01:00
Stefan Kangas
1eae0a8784 Add new option flyspell-correct-on-mouse-3
* lisp/textmodes/flyspell.el
(flyspell-correct-on-mouse-3): New option to bind
'flyspell-correct-word' to 'mouse-3'.
(flyspell--set-correct-on-mouse-3): New function to update option.
(flyspell-mode): Update 'flyspell-mouse-map' if above option is
set.
* doc/emacs/fixit.texi (Spelling): Mention the new option.
* etc/NEWS: Announce the new option.
2020-08-16 19:40:43 +02:00
Stefan Kangas
a0653f809f Remove redundant :group args from flyspell.el
* lisp/textmodes/flyspell.el: Remove redundant :group args.
2020-08-16 19:35:29 +02:00
Stefan Kangas
b06ef8d5e9 Mark XEmacs compat alias as obsolete
* lisp/subr.el (user-original-login-name): Mark as obsolete.  This
XEmacs compat alias was obsoleted even by XEmacs, so there is no point
in keeping it around.
2020-08-16 15:38:06 +02:00
Steven Allen
ba9a2b6c27 Set the current buffer in esh-mode before running filter functions
* lisp/eshell/esh-mode.el: (eshell-output-filter): Match
current-buffer behavior of comint-output-filter (bug#42870).

This change (a) sets the current buffer to the process-buffer when
invoking preoutput filter functions and (b) only invokes them when the
process-buffer is live. Otherwise, the preoutput filter functions be
invoked in whatever buffer happens to be focused, breaking hooks that
read buffer-local variables.
2020-08-16 14:31:27 +02:00
Mattias Engdegård
9f464ccaf9 Stop using calc for ntlm time computation
* lisp/net/ntlm.el: Don't require calc.
(ntlm-compute-timestamp): Use plain arithmetic instead of calc.
(ntlm--time-to-timestamp): New helper function.
2020-08-16 11:08:43 +02:00
Stefan Monnier
8255eb526f * lisp/net/eudc-bob.el (eudc-bob-pipe-object-to-external-program): Simplify
Use `with-temp-buffer`.
2020-08-15 22:44:16 -04:00
Stefan Monnier
4bb2f39591 * lisp/net/eudc-bob.el: Use lexical-binding; Misc simplifications
(eudc-bob-generic-keymap, eudc-bob-image-keymap)
(eudc-bob-sound-keymap, eudc-bob-url-keymap, eudc-bob-mail-keymap):
Move initialization into declaration.  Use RET rather than `return`.
(eudc-jump-to-event): Delete; use `mouse-set-point` instead.
(eudc-bob-save-object): Rewrite using `write-region`.
(eudc-bob-popup-menu): Use `popup-menu`.
2020-08-15 17:30:11 -04:00
Paul Eggert
748afc183c Fix recently-introduced Fdelete bug
Problem reported by Pip Cet in:
https://lists.gnu.org/r/emacs-devel/2020-08/msg00444.html
* src/fns.c (Fdelete): Fix correctness bug via a simpler (though more
memory-intensive) approach.  It’s probably not worth optimizing
the memory usage yere.
* test/src/fns-tests.el (test-vector-delete): Add test for the bug.
2020-08-15 12:37:04 -07:00
Paul Eggert
b467bb531e Minimize ‘equal’ calls in (delete x vector)
* src/fns.c (Fdelete): When deleting from a vector, call Fequal
only once per vector element.  This is faster when Fequal is slow,
and avoids the need to preinitialize the vector result.  Finish
when the result is exhausted, not when the input is exhausted;
the two are equivalent but the former may be faster.
* test/src/fns-tests.el (test-vector-delete): New test.
2020-08-15 11:19:51 -07:00
Paul Eggert
e97def2bbc Fdelete speed tweak for strings
* src/fns.c (Fdelete): Hoist FIXNUMP out of a loop,
and turn it into CHARACTERP.
2020-08-15 11:19:51 -07:00
Paul Eggert
f1b06fd5fc Prefer Fvector to make_uninit_vector
Fvector is less error-prone than make_uninit_vector, as it
avoids the possibility of a GC crash due to an uninitialized
vector.  So prefer Fvector to make_uninit_vector when this is
easy (and when there's no significant performance difference).
Inspired by a suggestion by Pip Cet in:
https://lists.gnu.org/r/emacs-devel/2020-08/msg00313.html
* src/ccl.c (Fregister_ccl_program):
* src/ccl.c (Fregister_ccl_program):
* src/charset.c (Fdefine_charset_internal):
* src/font.c (Fquery_font, Ffont_info, syms_of_font):
* src/fontset.c (font_def_new, Fset_fontset_font):
* src/ftfont.c (ftfont_shape_by_flt):
* src/hbfont.c (hbfont_shape):
* src/macfont.m (macfont_shape):
* src/search.c (Fnewline_cache_check):
* src/xfaces.c (Fx_family_fonts):
* src/xfns.c (Fx_window_property_attributes):
Prefer Fvector to make_uninit_vector when either is easy.
* src/fontset.c (font_def_new): Now a function with one less
arg instead of a do-while macro, and renamed from FONT_DEF_NEW.
All uses changed.
2020-08-15 11:19:51 -07:00
Paul Eggert
d0145537fa Fix GC bugs related to uninitialized vectors
Avoid problems if GC occurs while initializing a vector.
Problem with Fdelete reported by Pip Cet in:
https://lists.gnu.org/r/emacs-devel/2020-08/msg00313.html
I looked for similar problems elsewhere and found quite a few.
* src/coding.c (make_subsidiaries):
* src/composite.c (syms_of_composite):
* src/font.c (build_style_table, Ffont_get_glyphs):
* src/nsselect.m (clean_local_selection_data):
* src/nsxwidget.m (js_to_lisp):
* src/syntax.c (init_syntax_once):
* src/window.c (Fcurrent_window_configuration):
* src/xselect.c (selection_data_to_lisp_data)
(clean_local_selection_data):
Use make_nil_vector instead of make_uninit_vector.
* src/fns.c (Fdelete):
* src/xwidget.c (webkit_js_to_lisp):
Use allocate_nil_vector instead of allocate_vector.
* src/search.c (Fnewline_cache_check):
Use make_vector instead of make_uninit_vector.
2020-08-15 11:19:51 -07:00
Roland Kaufmann
4cba236749 Allow build configuration on Apple ARM devices (bug#41994)
* configure.ac: Add arm as a port target for Darwin.

Copyright-paperwork-exempt: yes
2020-08-15 17:06:31 +01:00
Lars Ingebrigtsen
1e7102640b Add new variable term-set-terminal-size (not setting LINES/COLUMNS)
* lisp/term.el (term-set-terminal-size): New variable (bug#37564).
(term-exec-1): Use it.  Based on a patch from Matthew Leach
<matthew@mattleach.net>.
2020-08-15 14:35:16 +02:00
Lars Ingebrigtsen
37358dd43c Make Gnus stop clobbering the M-s search prefix key binding
* doc/emacs/misc.texi (Gnus Summary Buffer): Ditto.

* doc/misc/gnus.texi (Searching for Articles): Document moved M-s
(bug#39706).

* lisp/gnus/gnus-sum.el (gnus-summary-mode-map): Move
gnus-summary-search-article-forward to M-s M-s, and add M-s M-r
for gnus-summary-search-article-backward.
2020-08-15 14:20:02 +02:00
Steven Allen
f4e7f7695f Fix thinko in setting url-portspec
* lisp/url/url-expand.el (url-default-expander): Set
`url-portspec' (bug#42869).
2020-08-15 13:37:38 +02:00
Dario Gjorgjevski
5b463af8dd Tweak how ido handles killing virtual buffers
* lisp/ido.el (ido-buffer-internal): Handle killing of virtual buffers
as a special case.
(ido-visit-buffer): Document the special case (bug#38294).
2020-08-15 12:33:43 +02:00
Eli Zaretskii
83000ae6d7 Don't wrap lines at NBSP when nobreak-char-display is t
* src/xdisp.c (get_next_display_element): When
nobreak-char-display is t, display NBSP and non-ASCII hyphens as
themselves, not as their ASCII counterparts, just with the
nobreak-space/nobreak-hyphen face.  (Bug#42811)
2020-08-15 13:23:58 +03:00
Jari Aalto
f3afb23d26 Add support for ffap guessing at file names containing spaces
* lisp/ffap.el (ffap-file-name-with-spaces): New variable (bug#8439).
(ffap-search-backward-file-end, ffap-search-forward-file-end)
(ffap-dir-separator-near-point): New functions.
(ffap-string-at-point): Use the variable and the new functions to
guess at files containing strings.
2020-08-15 12:11:41 +02:00
Paul Eggert
f712cdbe9e Pacify Apple clang 11 __builtin_assume
Problem reported by Mattias Engdegård in:
https://lists.gnu.org/r/emacs-devel/2020-08/msg00300.html
* src/lisp.h (bool_vector_bitref, bool_vector_set):
Use eassert instead of eassume for bool_vector_size checks.
2020-08-14 19:29:46 -07:00
Amin Bandali
e365b9ab7b
Add `message' to erc-match.el highlight types
* lisp/erc/erc-match.el (erc-current-nick-highlight-type,
erc-pal-highlight-type, erc-fool-highlight-type,
erc-keyword-highlight-type, erc-dangerous-host-highlight-type): Add
`message' type for highlighting the entire message but not the
sender's nick.
(erc-match-message): Check for the new `message' highlight type and
propertize the message (not including the nick) accordingly.
* etc/NEWS: Announce the addition of the `message' highlight type.
2020-08-14 22:12:02 -04:00
Paul Eggert
4ecc2ba01d Fix bus error on Debian bullseye
Problem reported by Lars Ingebrigtsen, and problem diagnosis
and most of this patch by Pip Cet (Bug#42832).
* src/pdumper.c (dump_bitsets_init): Rename from dump_bitset_init.
All callers changed.  Initialize two bitsets with a single malloc
call.
(struct pdumper_loaded_dump_private): New member last_mark_bits.
(pdumper_find_object_type_impl): Return PDUMPER_NO_OBJECT if
the last_mark_bits’ bit is clear.
(pdumper_set_marked_impl): Assert that the last_mark_bits’
bit is set.
(pdumper_clear_marks_impl): Save mark_bits into
last_mark_bits before clearing mark_bits.
Co-authored-by: Pip Cet <pipcet@gmail.com>
2020-08-14 15:51:52 -07:00
Basil L. Contovounesios
ca6c3bec07 ; Touch up last two changes to etc/NEWS 2020-08-14 23:32:48 +01:00
Dmitry Gutov
42c19b7485 ; Change phrasing according to the rename 2020-08-14 23:33:03 +03:00
Stefan Kangas
8b36ebc950 Remove XEmacs compat code from mwheel.el
* lisp/mwheel.el (mwheel-event-button, mwheel-event-window):
Remove XEmacs compat code.
2020-08-14 19:40:28 +02:00
Noam Postavsky
43091e6c50 Make configure say so if we have "--with-json" but no jansson support
* configure.ac (OPTION_DEFAULT_IFAVAILABLE): New macro.  Use it to
define the --with-json option.  Add with_json and HAVE_JSON to the
'MISSING' checks (bug#39953).
2020-08-14 19:31:16 +02:00