]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 years agoruby-mode: eliminate redundant regexp branch
Mattias Engdegård [Tue, 5 Jan 2021 11:01:32 +0000 (12:01 +0100)]
ruby-mode: eliminate redundant regexp branch

* lisp/progmodes/ruby-mode.el (ruby-add-log-current-method):
Since ruby-operator-re matches dot, don't include both in regexp.
This pacifies relint.

3 years ago; * lisp/subr.el (ctl-x-map): Fix typo in kill-buffer binding.
Mattias Engdegård [Tue, 5 Jan 2021 10:27:41 +0000 (11:27 +0100)]
; * lisp/subr.el (ctl-x-map): Fix typo in kill-buffer binding.

3 years agoPretty-print keys without <> around modifiers (bug#45536)
Mattias Engdegård [Tue, 29 Dec 2020 15:55:06 +0000 (16:55 +0100)]
Pretty-print keys without <> around modifiers (bug#45536)

Be consistent when pretty-printing keys: put modifiers outside <>,
thus the more logical C-M-<return> instead of <C-M-return>.

* src/keymap.c (Fsingle_key_description):
Skip modifier prefix before adding <>.
* doc/lispref/help.texi (Describing Characters): Update example.
* doc/lispref/debugging.texi (Backtraces):
* doc/lispref/minibuf.texi (Text from Minibuffer):
Use @kbd instead of @key.
* etc/NEWS: Announce the change.
* test/src/keymap-tests.el (keymap--key-description):
* test/lisp/subr-tests.el (subr--kbd): New tests.

3 years ago* lisp/filesets.el (filesets-external-viewers): Tighten regexp.
Mattias Engdegård [Tue, 5 Jan 2021 09:27:36 +0000 (10:27 +0100)]
* lisp/filesets.el (filesets-external-viewers): Tighten regexp.

3 years agoperl-mode: Display here-docs as strings instead of comments
Harald Jörg [Tue, 5 Jan 2021 09:15:04 +0000 (10:15 +0100)]
perl-mode: Display here-docs as strings instead of comments

* lisp/progmodes/perl-mode.el
(perl-syntax-propertize-function): Handle HERE doc starter
lines ending in a comment.
(perl-heredoc): New face for HERE docs, inheriting from
font-lock-string-face.
(perl-font-lock-syntactic-face-function): Apply the new face
to HERE docs (Bug#23461).

* test/lisp/progmodes/cperl-mode-tests.el
(cperl-test--run-bug-10483): Skip for Perl mode.  The test
explicitly calls a function of CPerl mode.

3 years ago* lisp/subr.el (esc-map): Initialize inside declaration
Stefan Monnier [Tue, 5 Jan 2021 04:20:44 +0000 (23:20 -0500)]
* lisp/subr.el (esc-map): Initialize inside declaration

* src/commands.h (meta_map):
* src/keymap.c (meta_map): Delete variable.
(syms_of_keymap): Don't initialize esc-map here.
(initial_define_key):
* src/keymap.h (initial_define_key): Delete function.

* src/keyboard.c (keys_of_keyboard): Don't initialize esc-map here.

* src/window.h (keys_of_window):
* src/window.c (keys_of_window): Delete function.
* src/lisp.h (keys_of_casefiddle):
* src/casefiddle.c (keys_of_casefiddle): Delete function.
* src/emacs.c (main): Don't call them.

3 years ago* lisp/subr.el (ctl-x-map): Initialize inside the declaration.
Stefan Monnier [Tue, 5 Jan 2021 04:11:07 +0000 (23:11 -0500)]
* lisp/subr.el (ctl-x-map): Initialize inside the declaration.

* src/command.h (control_x_map):
* src/keymap.c (control_x_map): Delete variable.
(syms_of_keymap):
* src/keyboard.c (keys_of_keyboard):
* src/casefiddle.c (keys_of_casefiddle):
* src/window.c (keys_of_window): Move initialization of ctl-x-map to
subr.el.

* src/lisp.h (syms_of_buffer):
* src/buffer.c (keys_of_buffer): Delete function.
* src/emacs.c (main): Don't call it.

3 years ago* lisp/subr.el (global-map): Initialize inside declaration.
Stefan Monnier [Tue, 5 Jan 2021 03:57:21 +0000 (22:57 -0500)]
* lisp/subr.el (global-map): Initialize inside declaration.

* src/commands.h (global_map):
* src/keymap.c (global_map): Delete variable.
(syms_of_keymap): Don't initialize global_map here.
(keys_of_keymap): Delete function.
* src/lisp.h (keys_of_cmds):
* src/cmds.c (keys_of_cmds): Delete function.
* src/emacs.c (main): Don't call them.

* src/window.c (keys_of_window): Don't initialize global_map here.
* src/keyboard.c (keys_of_keyboard): Don't initialize global_map here.

3 years agoUse lexical-binding in the remaining preloaded files
Stefan Monnier [Tue, 5 Jan 2021 01:57:42 +0000 (20:57 -0500)]
Use lexical-binding in the remaining preloaded files

* lisp/widget.el:
* lisp/w32-fns.el:
* lisp/textmodes/fill.el:
* lisp/term/common-win.el:
* lisp/scroll-bar.el:
* lisp/rfn-eshadow.el:
* lisp/menu-bar.el:
* lisp/language/tibetan.el:
* lisp/language/thai.el:
* lisp/language/misc-lang.el:
* lisp/language/lao.el:
* lisp/language/korean.el:
* lisp/language/japanese.el:
* lisp/language/indian.el:
* lisp/language/hebrew.el:
* lisp/language/european.el:
* lisp/language/ethiopic.el:
* lisp/language/english.el:
* lisp/language/cyrillic.el:
* lisp/language/chinese.el:
* lisp/jka-cmpr-hook.el:
* lisp/international/ucs-normalize.el:
* lisp/international/mule.el:
* lisp/international/mule-conf.el:
* lisp/international/iso-transl.el:
* lisp/international/fontset.el:
* lisp/international/characters.el:
* lisp/format.el:
* lisp/facemenu.el:
* lisp/electric.el:
* lisp/dos-w32.el:
* lisp/dos-fns.el:
* lisp/disp-table.el:
* lisp/cus-face.el:
* lisp/composite.el:
* lisp/bindings.el:
* admin/unidata/blocks.awk:
* admin/charsets/eucjp-ms.awk:
* admin/charsets/cp51932.awk: Use `lexical-binding`.

3 years ago* lisp/filesets.el: Use lexical-binding
Stefan Monnier [Mon, 4 Jan 2021 23:23:43 +0000 (18:23 -0500)]
* lisp/filesets.el: Use lexical-binding

Remove redundant `:group` args.  Require cl-lib and seq.
Fix various O(n²) bug and flag a few remaining ones.

(filesets-external-viewers): Simplify regexps.  Use \' instead of $.
Remove useless :constraint-flag properties.
(filesets-convert-path-list): η-reduce.
(filesets-eviewer-constraint-p): Mark :constraint-flag as obsolete.
(filesets-spawn-external-viewer): Can't use `run-hooks` on
lexical variable.
(filesets-filter-list): Fix O(n²) bug.
(filesets-ormap): Simplify.
(filesets-some, filesets-member, filesets-sublist): Make them
obsolete aliases.
(filesets-reset-fileset): Simplify.
(filesets-directory-files): Use `push`.
(filesets-spawn-external-viewer): Use `mapconcat` to fix O(n²) bug.
(filesets-cmd-get-args): Use `mapcan` to fix O(n²) bug.
(filesets-run-cmd): Use `mapconcat` and `mapcan` to fix O(n²) bugs.
(filesets-ingroup-collect-finder): Use dynamic scoping.
(filesets-ingroup-collect-files): Use `nreverse` to fix O(n²) bug.
(filesets-ingroup-collect-build-menu): Use `mapcan` to fix O(n²) bug.

3 years agoMake a process tests a bit more robust.
Philipp Stephani [Mon, 4 Jan 2021 21:08:39 +0000 (22:08 +0100)]
Make a process tests a bit more robust.

* test/src/process-tests.el
(process-tests/fd-setsize-no-crash/make-process): Allow for processes
to fail before 'exec'.

3 years ago* lisp/cedet/srecode/semantic.el: Use lexical-binding
Stefan Monnier [Mon, 4 Jan 2021 20:34:12 +0000 (15:34 -0500)]
* lisp/cedet/srecode/semantic.el: Use lexical-binding

(srecode-semantic-insert-tag): Can't use `run-hook-with-args` on
lexical variable.

3 years ago* lisp/mail/reporter.el: Use lexical-binding
Stefan Monnier [Mon, 4 Jan 2021 20:31:58 +0000 (15:31 -0500)]
* lisp/mail/reporter.el: Use lexical-binding

(reporter--run-functions): New function.
(reporter-dump-state): Use it and simplify the code.

3 years ago* lisp/erc/erc.el (erc-process-input-line): Undo confused last change
Stefan Monnier [Mon, 4 Jan 2021 20:25:29 +0000 (15:25 -0500)]
* lisp/erc/erc.el (erc-process-input-line): Undo confused last change

3 years agoruby-add-log-current-method: Support methods with symbolic names
Dmitry Gutov [Mon, 4 Jan 2021 19:13:33 +0000 (21:13 +0200)]
ruby-add-log-current-method: Support methods with symbolic names

* lisp/progmodes/ruby-mode.el (ruby-add-log-current-method):
Support methods with symbolic names.

3 years agoDo not assume Xrender merely because Cairo
Paul Eggert [Mon, 4 Jan 2021 18:33:43 +0000 (10:33 -0800)]
Do not assume Xrender merely because Cairo

Problem reported by Andrea Corallo in:
https://lists.gnu.org/r/emacs-devel/2021-01/msg00225.html
* src/xterm.c (x_term_init) [USE_CAIRO && !HAVE_XRENDER]:
Do not call XRenderQueryExtension.

3 years agoFix broken build on AIX 7.2
Paul Eggert [Sun, 3 Jan 2021 19:19:48 +0000 (11:19 -0800)]
Fix broken build on AIX 7.2

Without this fix, the build on AIX 7.2 with xlc fails in the ‘CCLD
temacs’ step with the diagnostic ‘ld: 0711-317 ERROR: Undefined
symbol: BC’.  This is because -lcurses does not define BC etc.
* configure.ac: When building terminfo.o, define
TERMINFO_DEFINES_BC if the library defines BC etc.
* src/terminfo.c (UP, BC, PC): Define depending on
TERMINFO_DEFINES_BC, not on TERMINFO.

(cherry picked from commit 632917461a7c1893a83979a3873b51d4da3b8a42)

3 years agoMerge from origin/emacs-27
Glenn Morris [Mon, 4 Jan 2021 15:50:26 +0000 (07:50 -0800)]
Merge from origin/emacs-27

99cc0045eb (origin/emacs-27) Update two user option names in the Widg...

3 years ago; Merge from origin/emacs-27
Glenn Morris [Mon, 4 Jan 2021 15:50:26 +0000 (07:50 -0800)]
; Merge from origin/emacs-27

The following commit was skipped:

32c960bdc6 Mention -lcurses problem on AIX

3 years agoMerge from origin/emacs-27
Glenn Morris [Mon, 4 Jan 2021 15:50:25 +0000 (07:50 -0800)]
Merge from origin/emacs-27

2e09efdb68 Revert previous patch which was installed into wrong branch.

3 years ago; Merge from origin/emacs-27
Glenn Morris [Mon, 4 Jan 2021 15:50:25 +0000 (07:50 -0800)]
; Merge from origin/emacs-27

The following commit was skipped:

585997d05a Fix broken build on AIX 7.2

3 years agoMerge from origin/emacs-27
Glenn Morris [Mon, 4 Jan 2021 15:50:25 +0000 (07:50 -0800)]
Merge from origin/emacs-27

a7c2793efe Fix last change

3 years ago; Merge from origin/emacs-27
Glenn Morris [Mon, 4 Jan 2021 15:50:25 +0000 (07:50 -0800)]
; Merge from origin/emacs-27

The following commit was skipped:

ec1e1f80e6 Add a reference between the Strings node and Search/Replace

3 years agoMerge from origin/emacs-27
Glenn Morris [Mon, 4 Jan 2021 15:50:25 +0000 (07:50 -0800)]
Merge from origin/emacs-27

90c782e92e Merge branch 'emacs-27' of git.savannah.gnu.org:/srv/git/e...

3 years ago; Merge from origin/emacs-27
Glenn Morris [Mon, 4 Jan 2021 15:50:25 +0000 (07:50 -0800)]
; Merge from origin/emacs-27

The following commit was skipped:

f0deca159d (emacs-27) ; Auto-commit of loaddefs files.

3 years agoMerge from origin/emacs-27
Glenn Morris [Mon, 4 Jan 2021 15:50:22 +0000 (07:50 -0800)]
Merge from origin/emacs-27

7384ec6416 Add warning comments abound binding keys in Isearch maps

3 years ago; Merge from origin/emacs-27
Glenn Morris [Mon, 4 Jan 2021 15:50:22 +0000 (07:50 -0800)]
; Merge from origin/emacs-27

The following commit was skipped:

3711339f92 Fix crash in ns_mouse_position (bug#45541)

3 years agoFix error in tramp-sh-handle-insert-directory
Michael Albinus [Mon, 4 Jan 2021 15:32:32 +0000 (16:32 +0100)]
Fix error in tramp-sh-handle-insert-directory

* lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory): Let buffer be
unibyte when applying numbers returned with the ls --dired option.
Reported by Justus Piater <Justus-dev@Piater.name>.

* test/lisp/net/tramp-tests.el (tramp--test-check-files): Extend test.

3 years agoUpdate two user option names in the Widget manual
Mauro Aranda [Mon, 4 Jan 2021 12:58:10 +0000 (09:58 -0300)]
Update two user option names in the Widget manual

* doc/misc/widget.texi (Basic Types): The user options
widget-glyph-directory and widget-glyph-enable were renamed long ago
to widget-image-directory and widget-image-enable, but the manual
kept calling them by their old names.  Update the names.

3 years agoFix build for --enable-checking=structs
Basil L. Contovounesios [Mon, 4 Jan 2021 13:09:40 +0000 (13:09 +0000)]
Fix build for --enable-checking=structs

The last change to lisp.h only added comments in Lisp_String, so the
portable dumper need not be changed.

* src/pdumper.c (dump_string): Update hash for Lisp_String.

3 years agoDon't skip widgets when moving backward
Mauro Aranda [Mon, 4 Jan 2021 13:02:20 +0000 (10:02 -0300)]
Don't skip widgets when moving backward

* lisp/wid-edit.el (widget-move): Remove code that caused
widget-backward to skip an immediate previous widget when moving
backward from the start of a widget.  (Bug#45623)

* test/lisp/wid-edit-tests.el (widget-test-widget-backward): New test.

3 years agoFix off-by-one error in mode-line-compact code
Amin Bandali [Mon, 4 Jan 2021 09:48:08 +0000 (10:48 +0100)]
Fix off-by-one error in mode-line-compact code

* src/xdisp.c (display_mode_line): Fix off-by-one error that would
chop off the final non-space character when compacting (bug#45646).

3 years agoFix computation of Lines in nnmaildir
Lars Ingebrigtsen [Mon, 4 Jan 2021 09:42:13 +0000 (10:42 +0100)]
Fix computation of Lines in nnmaildir

* lisp/gnus/nnmaildir.el (nnmaildir--update-nov): Lines is -1 if
it's not present; not 0 (probably) (bug#45650).

3 years ago* src/print.c (print_vectorlike): Use `HASH_TABLE_SIZE`
Stefan Monnier [Mon, 4 Jan 2021 06:00:33 +0000 (01:00 -0500)]
* src/print.c (print_vectorlike): Use `HASH_TABLE_SIZE`

3 years ago* src/xdisp.c (syms_of_xdisp): New var redisplay-skip-fontification-on-input
Stefan Monnier [Mon, 4 Jan 2021 05:59:56 +0000 (00:59 -0500)]
* src/xdisp.c (syms_of_xdisp): New var redisplay-skip-fontification-on-input

(handle_fontified_prop): Use it.

* src/keyboard.h (input_was_pending): Declare.
* src/keyboard.c (input_was_pending): Make non-static.

3 years ago* lisp/erc/erc.el: Use `run-hook-with-args` for `erc-pre-send-functions`
Stefan Monnier [Mon, 4 Jan 2021 05:21:02 +0000 (00:21 -0500)]
* lisp/erc/erc.el: Use `run-hook-with-args` for `erc-pre-send-functions`

(erc-process-input-line): A function can be `listp`.
(erc-send-input): Use `run-hook-with-args` for `erc-pre-send-functions`.
(erc-display-command): Comment out, unused.

3 years ago* lisp/calc/calc-yank.el (calc-edit-mode): Make it into a proper major mode
Stefan Monnier [Mon, 4 Jan 2021 05:01:58 +0000 (00:01 -0500)]
* lisp/calc/calc-yank.el (calc-edit-mode): Make it into a proper major mode

Also make `calc-edit-handler` hold a function instead of an expression.

(calc-original-buffer, calc-return-buffer, calc-one-window)
(calc-edit-handler, calc-restore-trail, calc-allow-ret)
(calc-edit-top): Give them a default value.
(calc--edit-mode): New function extracted from old `calc-edit-mode`.
(calc-edit-return, calc-edit-finish): Don't need to test `boundp` any more.
(calc-edit-finish): Allow `calc-edit-handler` to be a function.

(calc-edit, calc-alg-edit):

* lisp/calc/calc-prog.el (calc-edit-user-syntax, calc-user-define-edit):
* lisp/calc/calc-embed.el (calc-embedded-edit):
* lisp/calc/calc-sel.el (calc-edit-selection):
* lisp/calc/calc-store.el (calc-edit-variable):
Use `calc--edit-mode` and make first arg into a function.

* lisp/calc/calc-ext.el (calc-init-extensions): Autoload `calc--edit-mode`
instead of `calc-edit-mode`.

3 years ago* Makefile.in (test/%): New target
Stefan Monnier [Mon, 4 Jan 2021 04:15:33 +0000 (23:15 -0500)]
* Makefile.in (test/%): New target

3 years ago* lisp/calendar/appt.el (appt-activate): Set the local `write-file-functions`
Stefan Monnier [Mon, 4 Jan 2021 04:14:18 +0000 (23:14 -0500)]
* lisp/calendar/appt.el (appt-activate): Set the local `write-file-functions`

3 years agoFix last change in json.el
Mark Oteiza [Mon, 4 Jan 2021 03:07:59 +0000 (22:07 -0500)]
Fix last change in json.el

* lisp/json.el (json-encode-array): Include optimization for lists.

3 years ago* lisp/arc-mode.el (tar-grind-file-mode): Remove left over autoload
Stefan Monnier [Mon, 4 Jan 2021 01:16:40 +0000 (20:16 -0500)]
* lisp/arc-mode.el (tar-grind-file-mode): Remove left over autoload

3 years ago* doc/lispref/syntax.texi (Syntax Class Table): Clarify `@`
Stefan Monnier [Mon, 4 Jan 2021 01:14:16 +0000 (20:14 -0500)]
* doc/lispref/syntax.texi (Syntax Class Table): Clarify `@`

3 years ago* admin/last-chance.el (last-chance): Use `grep`s return value
Stefan Monnier [Sun, 3 Jan 2021 22:25:06 +0000 (17:25 -0500)]
* admin/last-chance.el (last-chance): Use `grep`s return value

(compilation-finish-functions): Only set it buffer-locally.

3 years ago* src/buffer.c (Fset_buffer_multibyte): Remove dead code
Stefan Monnier [Sun, 3 Jan 2021 21:07:16 +0000 (16:07 -0500)]
* src/buffer.c (Fset_buffer_multibyte): Remove dead code

3 years agoRemove unnecessary dependency on seq library
Mark Oteiza [Sun, 3 Jan 2021 21:58:09 +0000 (16:58 -0500)]
Remove unnecessary dependency on seq library

* lisp/json.el: Remove require declaration.
(json-encode-array): Just use length and /=.

3 years agoRemove relative paths for consistency
Phillip Lord [Sun, 3 Jan 2021 18:35:25 +0000 (18:35 +0000)]
Remove relative paths for consistency

* admin/nt/dist-build/build-zips.sh: Remove Paths

3 years ago* lisp/emacs-lisp/byte-run.el (make-obsolete): Make `when` mandatory
Stefan Monnier [Sun, 3 Jan 2021 20:43:31 +0000 (15:43 -0500)]
* lisp/emacs-lisp/byte-run.el (make-obsolete): Make `when` mandatory

(define-obsolete-function-alias, make-obsolete-variable)
(define-obsolete-variable-alias): Adjust similarly.

3 years agoMention -lcurses problem on AIX
Paul Eggert [Sun, 3 Jan 2021 20:32:27 +0000 (12:32 -0800)]
Mention -lcurses problem on AIX

* etc/PROBLEMS: Describe problem with Emacs 27 and -lcurses.
Do not merge to master.

3 years agoFix broken build on AIX 7.2
Paul Eggert [Sun, 3 Jan 2021 19:19:48 +0000 (11:19 -0800)]
Fix broken build on AIX 7.2

Without this fix, the build on AIX 7.2 with xlc fails in the ‘CCLD
temacs’ step with the diagnostic ‘ld: 0711-317 ERROR: Undefined
symbol: BC’.  This is because -lcurses does not define BC etc.
* configure.ac: When building terminfo.o, define
TERMINFO_DEFINES_BC if the library defines BC etc.
* src/terminfo.c (UP, BC, PC): Define depending on
TERMINFO_DEFINES_BC, not on TERMINFO.

3 years agoRevert previous patch which was installed into wrong branch.
Paul Eggert [Sun, 3 Jan 2021 19:58:34 +0000 (11:58 -0800)]
Revert previous patch which was installed into wrong branch.

3 years agoFix broken build on AIX 7.2
Paul Eggert [Sun, 3 Jan 2021 19:19:48 +0000 (11:19 -0800)]
Fix broken build on AIX 7.2

Without this fix, the build on AIX 7.2 with xlc fails in the ‘CCLD
temacs’ step with the diagnostic ‘ld: 0711-317 ERROR: Undefined
symbol: BC’.  This is because -lcurses does not define BC etc.
* configure.ac: When building terminfo.o, define
TERMINFO_DEFINES_BC if the library defines BC etc.
* src/terminfo.c (UP, BC, PC): Define depending on
TERMINFO_DEFINES_BC, not on TERMINFO.

3 years agoFix child frame restacking on NS (bug#41422)
Alan Third [Sun, 3 Jan 2021 16:15:18 +0000 (16:15 +0000)]
Fix child frame restacking on NS (bug#41422)

* src/nsfns.m (Fns_frame_restack): Use new restackWindow method.
* src/nsterm.m ([EmacsWindow orderFront:]):
([EmacsWindow makeKeyAndOrderFront:]):
(nswindow_orderedIndex_sort):
([EmacsWindow orderBack:]):
([EmacsWindow restackWindow:above:]): Override superclass methods to
handle child windows the way we want.

3 years ago* lisp/progmodes/xref.el (xref--show-defs-buffer-at-bottom): Fix missing arg
Stefan Monnier [Sun, 3 Jan 2021 04:12:10 +0000 (23:12 -0500)]
* lisp/progmodes/xref.el (xref--show-defs-buffer-at-bottom): Fix missing arg

3 years agoFix crash when using menus and tramp on NS
Alan Third [Sat, 2 Jan 2021 22:27:53 +0000 (22:27 +0000)]
Fix crash when using menus and tramp on NS

; Fixes bug#24472, bug#37557 and bug#37922.

* src/nsterm.m (ns_select): Don't drain outerpool in this function.

3 years agoFix NS toolbar image release crash (bug#43973)
Alan Third [Sat, 2 Jan 2021 18:19:39 +0000 (18:19 +0000)]
Fix NS toolbar image release crash (bug#43973)

The toolbar fails to make a proper copy of EmacsImage objects, so
releasing the copy incorrectly released instance variables from the
original objects.

* src/nsimage.m ([EmacsImage copyWithZone:]): New function to enable
correct copying of EmacsImage.

3 years agobibtex-mode: Extend widget bibtex-entry-alist
Roland Winkler [Sat, 2 Jan 2021 19:44:23 +0000 (13:44 -0600)]
bibtex-mode: Extend widget bibtex-entry-alist

3 years agoReposition call to set-buffer-modified-p in sieve-upload
Eric Abrahamsen [Sat, 2 Jan 2021 19:05:38 +0000 (11:05 -0800)]
Reposition call to set-buffer-modified-p in sieve-upload

* lisp/net/sieve.el (sieve-upload): It's meant to affect the script
buffer, not sieve-buffer, so needs to be outside the call to
with-current-buffer.

3 years agoxref--show-pos-in-buf: Don't set other-window-scroll-buffer
Dmitry Gutov [Sat, 2 Jan 2021 18:50:22 +0000 (20:50 +0200)]
xref--show-pos-in-buf: Don't set other-window-scroll-buffer

* lisp/progmodes/xref.el (xref--show-pos-in-buf):
Don't set other-window-scroll-buffer (bug#45581).

3 years agoFix backslash mistakes in doc strings in C code
Mattias Engdegård [Sat, 2 Jan 2021 17:08:47 +0000 (18:08 +0100)]
Fix backslash mistakes in doc strings in C code

These were found by an instrumented version of make-docfile.

* src/gnutls.c (Fgnutls_available_p):
* src/keymap.c (Fkey_description):
* src/xdisp.c (syms_of_xdisp):

3 years agoFix Quit button in dictionary buffer
Mauro Aranda [Sat, 2 Jan 2021 14:59:36 +0000 (11:59 -0300)]
Fix Quit button in dictionary buffer

* lisp/net/dictionary.el (dictionay-close): Changing the arity of the
function in cc5f2803785c5dc785f09a292313cf799e8d29bb was a mistake.
Restore it, but mark the argument as unused to avoid a
wrong-number-of-arguments error when using the Quit button.

3 years agoAvoid printing stacktraces when it probably wouldn't work anyway.
Philipp Stephani [Sat, 2 Jan 2021 14:04:50 +0000 (15:04 +0100)]
Avoid printing stacktraces when it probably wouldn't work anyway.

* src/eval.c (signal_or_quit): Don't try to call the debugger if it's
inhibited or we are about to dump or bootstrap.  In those cases the
debugger probably wouldn't work anyway.

3 years agoMake a process test faster.
Philipp Stephani [Sat, 2 Jan 2021 12:53:17 +0000 (13:53 +0100)]
Make a process test faster.

The test 'process-tests/fd-setsize-no-crash/make-process' used to call
'sleep' to ensure that enough processes are live to trigger a
FD_SETSIZE overflow.  However, we can just call 'cat' instead and
close standard input when done.  That way, we only wait as long as
needed.

* process-tests.el
(process-tests/fd-setsize-no-crash/make-process): Invoke 'cat' instead
of 'sleep'.  Close standard input to exit the 'cat' processes.

3 years agoSimplify TTY allocation.
Philipp Stephani [Sat, 2 Jan 2021 12:30:53 +0000 (13:30 +0100)]
Simplify TTY allocation.

The 'process-tty-name' already provides the TTY name, we don't have
interrogate the TTY host.

* test/src/process-tests.el
(process-tests/fd-setsize-no-crash/make-serial-process): Use
'process-tty-name' instead of having the TTY host print its TTY
name.  Check whether TTY names are unique.
(process-tests--new-pty, process-tests--with-temp-file): Remove;
no longer used.

3 years agoFix last change in characters.el
Eli Zaretskii [Sat, 2 Jan 2021 11:36:54 +0000 (13:36 +0200)]
Fix last change in characters.el

* lisp/international/characters.el: Adjust syntax of more
characters to follow that of Unicode properties.  (Bug#44974)

3 years ago; * lisp/progmodes/flymake.el: Bump version to 1.1.0.
João Távora [Sat, 2 Jan 2021 11:18:40 +0000 (11:18 +0000)]
; * lisp/progmodes/flymake.el: Bump version to 1.1.0.

3 years agoFix syntax of symbol and punctuation characters
Eli Zaretskii [Sat, 2 Jan 2021 10:42:16 +0000 (12:42 +0200)]
Fix syntax of symbol and punctuation characters

* lisp/international/characters.el: Adjust syntax of punctuation
and symbol charcaters to follow that of Unicode properties.
(Bug#44974)

3 years agoFix last change
Eli Zaretskii [Sat, 2 Jan 2021 08:27:28 +0000 (10:27 +0200)]
Fix last change

* doc/lispref/strings.texi (Creating Strings): Improve wording of
last change.  (Bug#45516)

3 years agoAdd a reference between the Strings node and Search/Replace
Lars Ingebrigtsen [Tue, 29 Dec 2020 01:19:03 +0000 (02:19 +0100)]
Add a reference between the Strings node and Search/Replace

* doc/lispref/strings.texi (Creating Strings): Mention
string-replace/replace-regexp-in-string (bug#45516).

(cherry picked from commit b9359d4183a1a6923122d3aa12b922ab89693354)

3 years agoruby-smie-rules: Avoid one case of infinite recursion
Dmitry Gutov [Sat, 2 Jan 2021 02:18:59 +0000 (04:18 +0200)]
ruby-smie-rules: Avoid one case of infinite recursion

* lisp/progmodes/ruby-mode.el (ruby-smie-rules):
Avoid one case of infinite recursion (bug#29107).

3 years agoFix GNUstep warnings
Alan Third [Sat, 19 Dec 2020 20:46:55 +0000 (20:46 +0000)]
Fix GNUstep warnings

* src/nsterm.h: EmacsSurface is only required if NS_DRAW_TO_BUFFER is
defined.
* src/nsterm.m (ns_judge_scroll_bars): Remove unused variable.
* src/nsmenu.m (update_frame_tool_bar):
(ns_update_menubar): Remove unused variables.

3 years agoImprove drawing performance on macOS
Alan Third [Wed, 16 Dec 2020 21:12:04 +0000 (21:12 +0000)]
Improve drawing performance on macOS

* configure.ac: Require IOSurface framework.
* src/nsterm.h: New EmacsSurface class and update EmacsView
definitions.
* src/nsterm.m (ns_update_end):
(ns_unfocus): Use new unfocusDrawingBuffer method.
(ns_draw_window_cursor): Move ns_focus to before we set colors.
([EmacsView dealloc]):
([EmacsView viewDidResize:]): Handle new EmacsSurface class.
([EmacsView initFrameFromEmacs:]): Remove reference to old method.
([EmacsView createDrawingBuffer]): Remove method.
([EmacsView focusOnDrawingBuffer]):
([EmacsView windowDidChangeBackingProperties:]): Use new EmacsSurface
class.
([EmacsView unfocusDrawingBuffer]): New method.
([EmacsView copyRect:to:]): Get information from the context instead
of direct from the IOSurface.
([EmacsView updateLayer]): Use new EmacsSurface class.
([EmacsView copyRect:to:]): Use memcpy to copy bits around instead of
using NS image functions.
([EmacsSurface initWithSize:ColorSpace:]):
([EmacsSurface dealloc]):
([EmacsSurface getSize]):
([EmacsSurface getContext]):
([EmacsSurface releaseContext]):
([EmacsSurface getSurface]):
([EmacsSurface copyContentsTo:]): New class and methods.

3 years agobibtex-mode: Handle biblatex field aliases (bug#44976)
Roland Winkler [Fri, 1 Jan 2021 22:35:15 +0000 (16:35 -0600)]
bibtex-mode: Handle biblatex field aliases (bug#44976)

* lisp/textmodes/bibtex.el (bibtex-biblatex-entry-alist): Define
field aliases.
(bibtex-vec-incr): Remove.
(bibtex-format-entry, bibtex-validate): Check for field aliases.
(bibtex--skip-field-aliases): New function.
(bibtex-field-list): Use it.

3 years agoFix CCL_MOD typo
Paul Eggert [Fri, 1 Jan 2021 20:57:26 +0000 (12:57 -0800)]
Fix CCL_MOD typo

* src/ccl.c (ccl_driver): Fix typo that disabled the
checks for undefined behavior with integer remainder.
Problem caught by Oracle Studio 12.6.

3 years agoAdd overflow check for INPUT_EVENT_POS_MIN
Paul Eggert [Fri, 1 Jan 2021 20:55:35 +0000 (12:55 -0800)]
Add overflow check for INPUT_EVENT_POS_MIN

* src/keyboard.c (INPUT_EVENT_POS_MIN): Don’t assume (-1 -
INPUT_EVENT_POS_MAX) fits into ptrdiff_t.  This fixes a
purely-theoretical problem that cannot occur on two’s-complement
arithmetic.  The Solaris 10 compiler still complains incorrectly,
but oh well.

3 years agoPort to Solaris 10
Paul Eggert [Fri, 1 Jan 2021 20:52:55 +0000 (12:52 -0800)]
Port to Solaris 10

* configure.ac: Instead of AC_CHECK_HEADER, use AC_COMPILE_IFELSE
with X11/Intrinsic.h when checking for X11/extensions/Xrender.h.
This suppresses a bogus "report a bug to bug-gnu-emacs" diagnostic
from 'configure' in Solaris 10.
(SETUP_SLAVE_PTY): Adjust to recent renaming of forkin to
std_in in callproc.c.  Needed on Solaris and Unixware.
* lib-src/Makefile.in (LIB_GETRANDOM, LIBS_ETAGS): New vars,
needed because on Solaris 10 the Gnulib tempname module now needs
the -lrt library for clock_gettime.  Throw in the LIB_GETRANDOM
stuff too while we’re at it; from getrandom.m4 it seems to be
needed for MingW.
(LIBS_MOVE, etags_libs): Use them.
* src/callproc.c [SETUP_SLAVE_PTY]: Include sys/stream.h
and sys/stropts.h, for SETUP_SLAVE_PTY’s definiens.
* src/process.c [NEED_BSDTTY]: Don’t include bsdtty.h; hasn’t been
needed in years.
[USG5_4]: Don’t include sys/stream.h or sys/stropts.h; these
directives havbe been moved to callproc.c because the only use of
SETUP_SLAVE_PTY is there now.

3 years agoNew file scratch_buffer_dupfree.c
Paul Eggert [Fri, 1 Jan 2021 16:45:41 +0000 (08:45 -0800)]
New file scratch_buffer_dupfree.c

* lib/malloc/scratch_buffer_dupfree.c: New file, from Gnulib
(originally from glibc 2.33 code).
This is needed on macOS and some other platforms;
I forgot to commit it in the most recent Gnulib update.

3 years agoMerge branch 'emacs-27' of git.savannah.gnu.org:/srv/git/emacs into emacs-27
Eli Zaretskii [Fri, 1 Jan 2021 15:17:19 +0000 (17:17 +0200)]
Merge branch 'emacs-27' of git.savannah.gnu.org:/srv/git/emacs into emacs-27

3 years ago; Auto-commit of loaddefs files.
Glenn Morris [Fri, 1 Jan 2021 14:30:23 +0000 (06:30 -0800)]
; Auto-commit of loaddefs files.

3 years ago; Auto-commit of loaddefs files.
Glenn Morris [Fri, 1 Jan 2021 14:16:29 +0000 (06:16 -0800)]
; Auto-commit of loaddefs files.

3 years agoxref-show-definitions-completing-read: Default to the first location
Dmitry Gutov [Fri, 1 Jan 2021 13:18:41 +0000 (15:18 +0200)]
xref-show-definitions-completing-read: Default to the first location

* lisp/progmodes/xref.el (xref-show-definitions-completing-read):
Default to the first location.

3 years ago; ruby-smie--bosp: Fix the breakage
Dmitry Gutov [Fri, 1 Jan 2021 12:35:57 +0000 (14:35 +0200)]
; ruby-smie--bosp: Fix the breakage

3 years agoAdd warning comments abound binding keys in Isearch maps
Eli Zaretskii [Fri, 1 Jan 2021 11:52:37 +0000 (13:52 +0200)]
Add warning comments abound binding keys in Isearch maps

* lisp/isearch.el (isearch-mode-map)
(minibuffer-local-isearch-map): Add comments which warn against
wantonly rebinding unbound keys.

3 years agoFix a compilation warning.
Philipp Stephani [Fri, 1 Jan 2021 11:39:14 +0000 (12:39 +0100)]
Fix a compilation warning.

ruby-mode uses 'cl-evenp' at runtime, so cl-lib must be available at
runtime as well.

* lisp/progmodes/ruby-mode.el (cl-lib): Require at runtime as well.

3 years agoFix crash in ns_mouse_position (bug#45541)
Alan Third [Fri, 1 Jan 2021 10:36:39 +0000 (10:36 +0000)]
Fix crash in ns_mouse_position (bug#45541)

* src/nsterm.m (ns_mouse_position): Explicitly initialize f to NULL.

; Do not merge to master

3 years agoRemove stray copy of image-tests.el
Paul Eggert [Fri, 1 Jan 2021 10:03:46 +0000 (02:03 -0800)]
Remove stray copy of image-tests.el

* test/manual/image-circular-tests.el: Remove a stray copy of
image-tests.el that was appended to this file.  Found by its
duplicate copyright notice.

3 years agoUpdate from Gnulib by running admin/merge-gnulib.
Paul Eggert [Fri, 1 Jan 2021 09:51:18 +0000 (01:51 -0800)]
Update from Gnulib by running admin/merge-gnulib.

3 years agoMerge from origin/emacs-27
Paul Eggert [Fri, 1 Jan 2021 09:28:16 +0000 (01:28 -0800)]
Merge from origin/emacs-27

33d159c36f Fix copyright years by hand

3 years ago; Merge from origin/emacs-27
Paul Eggert [Fri, 1 Jan 2021 09:14:59 +0000 (01:14 -0800)]
; Merge from origin/emacs-27

The following commit was skipped:

8c1fe1e5ef Update copyright year to 2021

3 years agoMerge from origin/emacs-27
Paul Eggert [Fri, 1 Jan 2021 09:14:58 +0000 (01:14 -0800)]
Merge from origin/emacs-27

74a77ef299 Improve documentation of 'network-lookup-address-info'
c6d5555646 Display messages sent using ERC's /say
c156723769 Fix Rmail summary display when From: header is malformed

3 years agoUpdate copyright year to 2021
Paul Eggert [Fri, 1 Jan 2021 09:13:56 +0000 (01:13 -0800)]
Update copyright year to 2021

Run "TZ=UTC0 admin/update-copyright".

3 years agoFix some mistaken shell delinting
Paul Eggert [Fri, 1 Jan 2021 09:12:04 +0000 (01:12 -0800)]
Fix some mistaken shell delinting

* admin/merge-gnulib, admin/update-copyright, make-dist:
Revert recent mistaken changes that were put in merely to
pacify a shellcheck linter.

3 years agoFix copyright years by hand
Paul Eggert [Fri, 1 Jan 2021 08:33:28 +0000 (00:33 -0800)]
Fix copyright years by hand

These are dates that admin/update-copyright did not update.

3 years agoUpdate copyright year to 2021
Paul Eggert [Fri, 1 Jan 2021 07:48:14 +0000 (07:48 +0000)]
Update copyright year to 2021

Run "TZ=UTC0 admin/update-copyright $(git ls-files)".

3 years agoRevert recent add-to-ordered-list changes
Lars Ingebrigtsen [Fri, 1 Jan 2021 04:48:02 +0000 (05:48 +0100)]
Revert recent add-to-ordered-list changes

* doc/lispref/lists.texi (List Variables): Revert.

* lisp/subr.el (add-to-ordered-list): Revert recent changes
because the semantics are too muddled.

3 years agoCC Mode: increment version numbers to 5.35 due to standalone release
Alan Mackenzie [Thu, 31 Dec 2020 20:32:14 +0000 (20:32 +0000)]
CC Mode: increment version numbers to 5.35 due to standalone release

* doc/misc/cc-mode.texi.  Increment the mode to 5.35, twice.

* lisp/progmodes/cc-defs.el.  Increment the mode to "5.35.1".

3 years agoImprove documentation of 'network-lookup-address-info'
Eli Zaretskii [Thu, 31 Dec 2020 20:27:30 +0000 (22:27 +0200)]
Improve documentation of 'network-lookup-address-info'

* src/process.c (Fnetwork_lookup_address_info):
* doc/lispref/processes.texi (Misc Network): Document the error
message emitted by 'network-lookup-address-info' when it fails.

3 years agoruby-mode: Optimize expression expansion too
Dmitry Gutov [Thu, 31 Dec 2020 18:59:00 +0000 (20:59 +0200)]
ruby-mode: Optimize expression expansion too

This speeds up syntax-propertize almost 2x.

* lisp/progmodes/ruby-mode.el (ruby-syntax-propertize):
Optimize expression expansion too.
(ruby-syntax-propertize-expansion, ruby-font-lock-keywords)
(ruby-expression-expansion-re): Update to match.

3 years agoruby-syntax-propertize: Optimize two rules a little
Dmitry Gutov [Thu, 31 Dec 2020 17:50:48 +0000 (19:50 +0200)]
ruby-syntax-propertize: Optimize two rules a little

* lisp/progmodes/ruby-mode.el (ruby-syntax-propertize):
Optimize two rules a little.

3 years agoruby-mode: Recognize setter symbols
Dmitry Gutov [Thu, 31 Dec 2020 16:39:22 +0000 (18:39 +0200)]
ruby-mode: Recognize setter symbols

* lisp/progmodes/ruby-mode.el (ruby-syntax-propertize):
Add a rule for setter symbols (bug#42846).
(ruby-font-lock-keywords): Remove dead code, left over from before
commit 26f9c507.

* lisp/progmodes/ruby-mode.el (ruby-smie--bosp):
Handle '=' being part of a symbol (bug#42846).

* test/lisp/progmodes/ruby-mode-resources/ruby.rb:
Add corresponding indentation examples.

3 years agoFix type declaration of two Flymake customization variables
João Távora [Thu, 31 Dec 2020 16:04:32 +0000 (16:04 +0000)]
Fix type declaration of two Flymake customization variables

* lisp/progmodes/flymake.el (flymake-mode-line-format)
(flymake-mode-line-counter-format): Fix type declaration.