João Távora [Mon, 28 Dec 2020 09:10:19 +0000 (09:10 +0000)]
Robustify a helper function for test/lisp/minibuffer-tests.el
completion--pcm-first-difference-pos wasn't taking into account the
fact that faces may come in lists. bug#42149
* test/lisp/minibuffer-tests.el
(completion--pcm-first-difference-pos): Robustify.
João Távora [Tue, 24 Nov 2020 23:15:40 +0000 (23:15 +0000)]
Make a completion test robust to custom completion styles
* test/lisp/minibuffer-tests.el (completion-test1): Make test
resilient to more completion styles.
João Távora [Tue, 24 Nov 2020 22:34:22 +0000 (22:34 +0000)]
Add tests for bug#42149
* test/lisp/minibuffer-tests.el (completion--pcm-score)
(completion--pcm-first-difference-pos): New helpers.
(completion-pcm-test-1, completion-pcm-test-2)
(completion-pcm-test-3, completion-pcm-test-4)
(completion-pcm-test-5, completion-pcm-test-6)
(completion-substring-test-1, completion-substring-test-2)
(completion-substring-test-3, completion-substring-test-4)
(completion-flex-test-1, completion-flex-test-2)
(completion-flex-test-3): New tests.
Co-authored-by: Dario Gjorgjevski <dario.gjorgjevski@gmail.com>
Lars Ingebrigtsen [Tue, 29 Dec 2020 07:38:17 +0000 (08:38 +0100)]
Add some tests for align.el
Glenn Morris [Tue, 29 Dec 2020 05:36:47 +0000 (21:36 -0800)]
* src/xdisp.c (display_mode_line): I guess FALSE should be false.
Lars Ingebrigtsen [Tue, 29 Dec 2020 05:07:44 +0000 (06:07 +0100)]
Revert the previous display_string change
* src/xdisp.c (display_string): Revert adding the additional
ignore_text_properties parameter -- it was already covered by the
other mix of parameters.
Lars Ingebrigtsen [Tue, 29 Dec 2020 04:59:42 +0000 (05:59 +0100)]
Fix compact mode line text properties
* src/xdisp.c (display_mode_line): Display the compact mode
correctly (with text properties) (bug#45520).
Lars Ingebrigtsen [Tue, 29 Dec 2020 04:16:25 +0000 (05:16 +0100)]
Add a parameter to display_string to allow not ignoring text props
* src/xdisp.c (display_string): Add a parameter to allow not
ignoring text properties (bug#45520). Adjust callers throughout
xdisp.c.
Lars Ingebrigtsen [Tue, 29 Dec 2020 03:53:03 +0000 (04:53 +0100)]
Introduce new variable mode-line-compact
* doc/lispref/modes.texi (Mode Line Basics): Document it (bug#34476).
* src/xdisp.c (display_mode_line): Use it.
(syms_of_xdisp): New variable mode-line-compact.
Lars Ingebrigtsen [Tue, 29 Dec 2020 02:10:00 +0000 (03:10 +0100)]
Allow the flymake mode line indicator to be customized
* doc/misc/flymake.texi (Customizable variables): Mention it.
* lisp/progmodes/flymake.el (flymake-mode-line-indicator-format):
New variable (bug#33740).
(flymake--mode-line-format): Use it.
Lars Ingebrigtsen [Tue, 29 Dec 2020 02:04:51 +0000 (03:04 +0100)]
Add a SPLIT parameter to `format-spec'
* doc/lispref/strings.texi (Custom Format Strings): Document it.
* lisp/format-spec.el (format-spec): Add an optional parameter to
return a list of strings (bug#33740).
Basil L. Contovounesios [Tue, 29 Dec 2020 01:19:07 +0000 (01:19 +0000)]
Reword a long docstring in cc-langs.el
* lisp/progmodes/cc-langs.el (c-vsemi-status-unknown-p-fn): Reword
docstring to fit within 80 columns and silence the corresponding
byte-compiler warning (bug#44858).
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).
Lars Ingebrigtsen [Tue, 29 Dec 2020 01:01:57 +0000 (02:01 +0100)]
Allow mixing attributes and comments in the diary file
* lisp/calendar/diary-lib.el (diary-face-attrs): The attributes
don't have to be at the end of the line -- there may be ##warntime
or other comments (bug#19965).
João Távora [Mon, 28 Dec 2020 09:20:17 +0000 (09:20 +0000)]
Robustify completion match scoring for optimized patterns
Fixes: bug#42149
The function completion-pcm--hilit-commonality, which propertizes and
scores a previously confirmed match, expected its PATTERN argument to
match the strings of COMPLETIONS entirely (i.e. up to the string's
very end). But sometimes the ending wildcard, represented by the
'any' atom in PATTERN, is optimized away by
completion-pcm--optimize-pattern. Although this is mostly benign in
terms of highlighting commonality, it leads to incorrect score values.
In this change, we ensure that completion-pcm--hilit-commonality is
aware of this exception and isn't affected by it. We also document
the function a bit better and simplify its workings.
Originally reported by Dario Gjorgjevski <dario.gjorgjevski@gmail.com>
* lisp/minibuffer.el (completion-pcm--hilit-commonality):
Simplify. Add docstring.
* lisp/minibuffer.el (completion-pcm--hilit-commonality): Add
docstring
Alan Mackenzie [Mon, 28 Dec 2020 20:42:25 +0000 (20:42 +0000)]
CC Mode: Add newish AWK Mode facilities, as used in gawk-4.
* lisp/progmodes/cc-awk.el (c-awk-font-lock-invalid-namespace-separators):
New function.
(c-awk-context-expand-fl-region): New function.
(awk-font-lock-keywords): Enhance handling of function declarations to include
:: tokens. Fontify new system variable names FPAT, FUNCTAB, PREC, ROUNDMODE,
SYNTAB. Fontify new keywords BEGINFILE and ENDFILE. Fontify new system
functions asorti, dcngettext, isarray, patsplit, typeof. Fontify the new
directives @include, @load, @namespace. Call
c-awk-font-lock-invalid-namespace-separators as a matcher.
* lisp/progmodes/cc-fonts.el (top level): No longer require 'cc-awk.
* lisp/progmodes/cc-langs.el (c-before-context-fontification-functions): Give
AWK the value c-awk-context-expand-fl-region rather than nil.
* lisp/progmodes/cc-mode.el (top level): Declare awk-mode-syntax-table as a
variable.
Stefan Monnier [Mon, 28 Dec 2020 19:58:39 +0000 (14:58 -0500)]
* lisp/minibuffer.el: Avoid consecutive `any` in completion patterns
(completion-pcm--optimize-pattern): Turn multiple consecutive
occurrences of `any` into just a single one.
Suggested by Dario Gjorgjevski <dario.gjorgjevski@gmail.com>.
Glenn Morris [Mon, 28 Dec 2020 19:03:30 +0000 (11:03 -0800)]
Fix package tests for tetris no longer existing as a package
* test/lisp/emacs-lisp/package-tests.el
(package-test-list-filter-by-name, package-test-list-clear-filter):
Use ansi-color instead of tetris, which no longer has a version:.
Alan Third [Mon, 28 Dec 2020 15:02:39 +0000 (15:02 +0000)]
Fix crash in NS menu code
* src/nsmenu.m (ns_update_menubar): Don't assume that the top level
menus are correct when populating the submenus.
(free_frame_menubar): Clear the menu.
([EmacsMenu removeAllItems]): Actually remove all menu items.
Stefan Kangas [Mon, 28 Dec 2020 06:51:05 +0000 (07:51 +0100)]
Minor cleanups in tetris.el
* lisp/play/tetris.el: Remove redundant :group args.
(tetris-get-tick-period): Drop unnecessary check.
(tetris): Stylistic doc fixes.
Stefan Kangas [Mon, 28 Dec 2020 06:47:59 +0000 (07:47 +0100)]
* lisp/ps-print.el (ps-message-log-max): Remove XEmacs compat code.
Stefan Kangas [Mon, 28 Dec 2020 06:31:44 +0000 (07:31 +0100)]
Remove redundant 'function's around lambda in vhdl-mode.el
* lisp/progmodes/vhdl-mode.el (fboundp, vhdl-sort-alist, lambda)
(vhdl-create-mode-menu, vhdl-set-offset, vhdl-set-style)
(vhdl-regress-line, vhdl-align-inline-comment-region-1)
(vhdl-resolve-paths, vhdl-generate-makefile-1)
(vhdl-submit-bug-report): Remove redundant 'function's around lambda.
Lars Ingebrigtsen [Mon, 28 Dec 2020 05:42:06 +0000 (06:42 +0100)]
Fix too-long feedmail-sendmail-f-doesnt-sell-me-out doc string
* lisp/mail/feedmail.el (feedmail-sendmail-f-doesnt-sell-me-out):
Fold the example SMTP header using continuation folding.
Stefan Kangas [Thu, 10 Dec 2020 21:36:18 +0000 (22:36 +0100)]
Fill some auto-generated docstrings
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode)
(define-globalized-minor-mode): Fill auto-generated documentation
strings. (Bug#44858)
* lisp/subr.el (internal--fill-string-single-line)
(internal--format-docstring-line): New functions.
Stefan Kangas [Sun, 6 Dec 2020 11:44:19 +0000 (12:44 +0100)]
Make byte-compiler warn about wide docstrings
* lisp/emacs-lisp/bytecomp.el (byte-compile--wide-docstring-p):
(byte-compile-docstring-length-warn): New defuns.
(byte-compile-docstring-max-column): New defcustom.
(byte-compile--wide-docstring-substitution-len): New variable.
(byte-compile-warning-types, byte-compile-warnings): New value
'docstrings'.
(byte-compile-file-form-autoload, byte-compile-file-form-defvar):
(byte-compile-file-form-defvar-function, byte-compile-lambda):
(byte-compile-defvar, byte-compile-file-form-defalias): Warn about too
wide docstrings. (Bug#44858)
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-warn-wide-docstring/defconst)
(bytecomp-warn-wide-docstring/defvar): New tests.
(bytecomp--define-warning-file-test): New macro.
(bytecomp/warn-wide-docstring-autoload\.el)
(bytecomp/warn-wide-docstring-custom-declare-variable\.el)
(bytecomp/warn-wide-docstring-defalias\.el)
(bytecomp/warn-wide-docstring-defconst\.el)
(bytecomp/warn-wide-docstring-define-abbrev-table\.el)
(bytecomp/warn-wide-docstring-define-obsolete-function-alias\.el)
(bytecomp/warn-wide-docstring-define-obsolete-variable-alias\.el)
(bytecomp/warn-wide-docstring-defun\.el)
(bytecomp/warn-wide-docstring-defvar\.el)
(bytecomp/warn-wide-docstring-defvaralias\.el)
(bytecomp/warn-wide-docstring-ignore-fill-column\.el)
(bytecomp/warn-wide-docstring-ignore-override\.el)
(bytecomp/warn-wide-docstring-ignore\.el)
(bytecomp/warn-wide-docstring-multiline-first\.el)
(bytecomp/warn-wide-docstring-multiline\.el): New tests.
* test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-autoload.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-custom-declare-variable.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-defalias.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-defconst.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-define-abbrev-table.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-define-obsolete-function-alias.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-define-obsolete-variable-alias.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-defun.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-defvar.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-defvaralias.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-ignore-fill-column.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-ignore-override.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-ignore.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-multiline-first.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-multiline.el:
New files.
Lars Ingebrigtsen [Mon, 28 Dec 2020 03:24:01 +0000 (04:24 +0100)]
Make octave-send-region be asynchronous
* lisp/progmodes/octave.el (octave-send-region): Send things
asynchronously to the inferior process (bug#24492).
Yichao Yu [Mon, 28 Dec 2020 03:17:43 +0000 (04:17 +0100)]
Make XIM to work with non-CJK locales
* src/xfns.c (best_xim_style): Don't rely on supported_xim_styles
(bug#10867).
* src/xterm.c (x_draw_window_cursor): Adjust to modern input styles.
(xim_instantiate_callback): Ditto.
Lars Ingebrigtsen [Mon, 28 Dec 2020 03:09:51 +0000 (04:09 +0100)]
Fix background mode on Gnome 3.38 terminals
* lisp/term/xterm.el (xterm--version-handler): Adjust to Gnome
3.38 (bug#43891).
Lars Ingebrigtsen [Mon, 28 Dec 2020 01:47:25 +0000 (02:47 +0100)]
Fix alignment of Java String[] and the like
* lisp/align.el (align-rules-list): Allow aligning Java String[] etc
(bug#19385).
Test case:
class X
{
String field1;
String[] field2;
int field3;
int[] field4;
X field5;
X[] field6;
}
Lars Ingebrigtsen [Mon, 28 Dec 2020 01:18:16 +0000 (02:18 +0100)]
Document the text property limitations in mode lines
* doc/lispref/modes.texi (Properties in Mode, Mode Line Basics):
Mention the special text property limitations.
Lars Ingebrigtsen [Mon, 28 Dec 2020 01:03:56 +0000 (02:03 +0100)]
Allow remember-notes to use the *scratch* buffer
* lisp/textmodes/remember.el (remember-notes): Allow the
remember-notes buffer to use the *scratch* buffer (as documented)
(bug#20740).
Dmitry Gutov [Mon, 28 Dec 2020 00:30:09 +0000 (02:30 +0200)]
Rename and document the built-in xref-show-definitions-function's
* lisp/progmodes/xref.el (xref-show-definitions-buffer): Rename
from 'xref--show-defs-buffer'.
(xref-show-definitions-buffer-at-bottom): Rename from
'xref--show-defs-buffer-at-bottom'.
Tim Landscheidt [Sun, 27 Dec 2020 23:37:51 +0000 (00:37 +0100)]
Do not output two spaces for non-autoloaded ieieo constructor functions
* lisp/emacs-lisp/eieio-opt.el (eieio-help-constructor): Amend
format to avoid two spaces for non-autoloaded object constructor
functions (bug#45454).
Copyright-paperwork-exempt: yes
Stefan Monnier [Sun, 27 Dec 2020 22:31:07 +0000 (17:31 -0500)]
* lisp/emacs-lisp/package.el (package-archives): Add NonGNU ELPA
Stefan Monnier [Sun, 27 Dec 2020 22:16:54 +0000 (17:16 -0500)]
* lisp/textmodes/rst.el (rst-mode): Don't touch global hook
(rst-re): η-reduce.
Alan Third [Wed, 23 Dec 2020 20:12:02 +0000 (20:12 +0000)]
Remove NS menu synthesized events (bug#44333)
Remove the frame tracking stuff as it's not used for anything, and
move the update tracking into the EmacsMenu class.
* src/nsmenu.m (ns_update_menubar): Copy the parsing code from xmenu.c
and rework the NS specific code around to update the existing menus
instead of rebuilding them completely.
(ns_activate_menubar):
([EmacsMenu trackingNotification:]):
([EmacsMenu menuWillOpen:]):
([EmacsMenu menuDidClose:]): Remove unused functions.
([EmacsMenu menuNeedsUpdate:]): Remove menu tracking code and add code
to check whether an update is required.
([EmacsMenu fillWithWidgetValue:]):
([EmacsMenu addSubmenuWithTitle:]):
([EmacsMenu initWithTitle:]): Remove references to frame.
([EmacsMenu setFrame:]): Remove method.
([EmacsMenu clear]): Rename to removeAllItems.
([EmacsMenu removeAllItems]): Use built-in removeAllItems, if
available.
(syms_of_nsmenu): Remove tracking code.
* src/nsterm.m (ns_check_menu_open):
(ns_check_pending_open_menu):
(ns_create_terminal): Remove unused functions.
(ns_term_init): Get rid of menu tracking.
* src/nsterm.h (EmacsMenu): Remove frame, add needsUpdate and update
method definitions.
Basil L. Contovounesios [Sun, 27 Dec 2020 13:14:30 +0000 (13:14 +0000)]
; Fix recent shortdoc.el and fns.c additions
* lisp/emacs-lisp/shortdoc.el (list): Fix typos.
* src/fns.c (Flength_equal): Fix docstring.
Štěpán Němec [Sun, 27 Dec 2020 10:43:19 +0000 (11:43 +0100)]
; Fix the recent `length' doc string addition
Lars Ingebrigtsen [Sun, 27 Dec 2020 08:22:02 +0000 (09:22 +0100)]
Fix up length_internal with degenerate length inputs
* src/fns.c (length_internal): Protect against edge conditions.
Daniel Martín [Sun, 27 Dec 2020 08:04:56 +0000 (09:04 +0100)]
Improve "find definition" in *Help* buffers
* lisp/emacs-lisp/find-func.el (find-function-search-for-symbol): If
our regexp algorithm could not find a location for the symbol
definition, resort to find-function--search-by-expanding-macros.
* test/lisp/emacs-lisp/find-func-tests.el: Add a automatic test for a
function and variable generated by a macro.
* etc/NEWS: Advertise the improved functionality (bug#45443).
Lars Ingebrigtsen [Sun, 27 Dec 2020 08:00:23 +0000 (09:00 +0100)]
Add new predicates for sequence lengths
* doc/lispref/sequences.texi (Sequence Functions): Document them.
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns): Mark them as
side-effect-free.
* lisp/emacs-lisp/shortdoc.el (list): Mention them.
* src/fns.c (Flength): Mention them in the doc string.
(length_internal): New function.
(Flength_less, Flength_greater, Flength_equal): New defuns.
(syms_of_fns): Sym them.
Lars Ingebrigtsen [Sat, 26 Dec 2020 22:13:29 +0000 (23:13 +0100)]
Improve the edebug-form-data doc string
* lisp/emacs-lisp/edebug.el (edebug-form-data): Doc string
clarification (bug#42776).
Stefan Monnier [Sat, 26 Dec 2020 17:21:17 +0000 (12:21 -0500)]
* lisp/forms.el (forms--run-functions): New function
(forms--intuit-from-file, forms-save-buffer): Use it.
(forms-mode): Use it to fix regression.
Remove always-true test. Fix incorrect uses of `fboundp`.
(forms--iif-hook): Use `add-hook`.
(forms--iif-post-command-hook): Use `remove-hook` and fix typo.
(forms--debug): Use `mapconcat`.
Eli Zaretskii [Sat, 26 Dec 2020 13:01:52 +0000 (15:01 +0200)]
Fix test/src/process-tests on MS-Windows
* src/process.c (network_lookup_address_info_1) [WINDOWSNT]:
Initialize winsock.
Michael Albinus [Sat, 26 Dec 2020 11:39:10 +0000 (12:39 +0100)]
Rename Tramp method "media" to "mtp" (Bug#45402)
* doc/misc/tramp.texi (Quick Start Guide, GVFS-based methods):
Rename "media" to "mtp". (Bug#45402)
* etc/NEWS: Rename Tramp method "media" to "mtp". Fix typos.
* lisp/net/tramp-gvfs.el (tramp-gvfs-methods, tramp-media-methods)
(tramp-gvfs-activation-uri)
(tramp-gvfs-handler-volumeadded-volumeremoved)
(tramp-get-media-devices, top): Rename "media" to "mtp". (Bug#45402)
emacs-f [Tue, 8 Dec 2020 23:22:30 +0000 (18:22 -0500)]
Avoid missing email messages due to rmail-spam-filter
* lisp/mail/rmail-spam-filter.el (rsf--rmail-last-seen-message):
New function.
(rmail-spam-filter, rmail-get-new-mail-filter-spam): Call
'rsf--rmail-last-seen-message' instead of
'rmail-first-unseen-message'. (Bug#45128)
Copyright-paperwork-exempt: yes
Zajcev Evgeny [Wed, 16 Dec 2020 22:04:09 +0000 (01:04 +0300)]
Improvements for `:base-uri' svg image property
* src/image.c (svg_load): Use ENCODE_FILE for `:base-uri'
* doc/lispref/display.texi (SVG Images): Add more documentation for
`:base-uri'
Eli Zaretskii [Sat, 26 Dec 2020 08:23:04 +0000 (10:23 +0200)]
Fix messages with plural forms in todo-mode.el
* lisp/calendar/todo-mode.el (todo-move-item, todo-item-undone)
(todo-category-completions): Use 'ngettext' instead of hard-coding
plural forms by hand.
Paul Eggert [Sat, 26 Dec 2020 03:16:27 +0000 (19:16 -0800)]
Fix issues with lib/malloc out-of-dir builds
Problem reported by Mattias Engdegård in:
https://lists.gnu.org/r/emacs-devel/2020-12/msg01626.html
* configure.ac: If the scratch_buffer module is enabled, create
lib/malloc and (if doing dependencies) lib/deps/malloc.
* lib/Makefile.in (DEPFLAGS) [AUTO_DEPEND]: No longer any need to
squash lib dependencies into a single directory.
(clean): Also remove */*.o and $(DEPDIR)/*/*.d, to clean out
malloc/*.o and deps/malloc/*.d. Just remove *.d files in
dependencies so that rm does not complain about not being able to
remove deps/malloc.
(extraclean): Also remove malloc, if it is empty.
Lars Ingebrigtsen [Sat, 26 Dec 2020 02:59:35 +0000 (03:59 +0100)]
Kill the scdaemon after doing the mml-sec tests
* test/lisp/gnus/mml-sec-tests.el (mml-sec-test--kill-gpg-agent):
Kill the scdaemon, too (bug#43358).
Lars Ingebrigtsen [Fri, 25 Dec 2020 23:57:01 +0000 (00:57 +0100)]
Fix infloop in memory-report
* lisp/emacs-lisp/memory-report.el (memory-report--object-size-1):
Fix infloop on circular lists.
Lars Ingebrigtsen [Fri, 25 Dec 2020 21:44:56 +0000 (22:44 +0100)]
Fix package reloading problems on systems with symlinks
* lisp/emacs-lisp/package.el (package--files-load-history): We're
comparing the truenames, so ensure that we've using that
everywhere. This fixes problems when there's symlinks in the paths.
Lars Ingebrigtsen [Fri, 25 Dec 2020 21:29:42 +0000 (22:29 +0100)]
Refactor package--list-loaded-files for easier debuggability
* lisp/emacs-lisp/package.el (package--files-load-history)
(package--list-of-conflicts): Factor out from...
(package--list-loaded-files): ... this function for easier
debuggability.
Lars Ingebrigtsen [Fri, 25 Dec 2020 20:19:37 +0000 (21:19 +0100)]
Disable some semantic tests on systems without g++
* test/lisp/cedet/semantic-utest-ia.el: Disable g++ tests on
systems without g++.
Lars Ingebrigtsen [Fri, 25 Dec 2020 20:09:31 +0000 (21:09 +0100)]
Skip some mml tests that rely on CMS if that's not installed
Lars Ingebrigtsen [Fri, 25 Dec 2020 19:56:22 +0000 (20:56 +0100)]
Fix gpg-agent killing in mml-sec-tests
* test/lisp/gnus/mml-sec-tests.el (mml-sec-test--kill-gpg-agent):
Identify the gpg-agent more successfully after the resource dir
makeover.
Glenn Morris [Fri, 25 Dec 2020 18:36:48 +0000 (10:36 -0800)]
Merge from origin/emacs-27
b242bbb073 (origin/emacs-27) ; lisp/org/org.el: Fix Version header.
e0fc939c5f Add more details to the "word processor" section
fda9b3e83a * src/Makefile.in (DO_CODESIGN): Fix expected architecture...
Glenn Morris [Fri, 25 Dec 2020 18:36:48 +0000 (10:36 -0800)]
; Merge from origin/emacs-27
The following commit was skipped:
6bf22c933d Codesign the executable on recene MacOS systems
Glenn Morris [Fri, 25 Dec 2020 18:36:48 +0000 (10:36 -0800)]
Merge from origin/emacs-27
5d46593568 Support build of Emacs on ARM Macos machines
7f8793e5f1 Update to Org 9.4.4
7b3367a0b5 * lisp/so-long.el: Decrease use of passive voice.
a90836c638 * doc/misc/efaq.texi (New in Emacs 27): Add section.
711fe70dd8 * doc/misc/efaq.texi (Latest version of Emacs): Bump version.
52b30834fb * lisp/face-remap.el (face-remap-set-base): Doc fix. (Bug...
b3fe0ac62e Correct argument order in comment
Glenn Morris [Fri, 25 Dec 2020 18:36:25 +0000 (10:36 -0800)]
; lisp/org/org.el: Fix Version header.
This is flagged by the single org test that exists in Emacs.
Michael Albinus [Fri, 25 Dec 2020 17:45:29 +0000 (18:45 +0100)]
Tag another Tramp test :unstable on emba
* test/lisp/net/tramp-tests.el (tramp-test31-interrupt-process)
(tramp-test43-asynchronous-requests): Tag them :unstable on emba.
Michael Albinus [Fri, 25 Dec 2020 16:05:36 +0000 (17:05 +0100)]
Tag Tramp test :unstable
* test/lisp/net/tramp-tests.el (tramp-test31-interrupt-process):
Tag it :unstable on emba.
Eli Zaretskii [Fri, 25 Dec 2020 14:11:49 +0000 (16:11 +0200)]
; * etc/NEWS: Announce the last change.
Eli Zaretskii [Fri, 25 Dec 2020 13:58:15 +0000 (15:58 +0200)]
Fix last change
* lisp/international/mule-conf.el (ebcdic-int1, cp256, cp273)
(ebcdic-be, cp274, ebcdic-br, cp275, ebcdic-cp-dk, ebcdic-cp-no)
(cp277, ebcdic-cp-fi, ebcdic-cp-se, cp278, ebcdic-cp-it, cp280)
(ebcdic-jp-e, cp281, ebcdic-cp-es, cp284, ebcdic-cp-gb, cp285)
(ebcdic-jp-kana, cp290, ebcdic-cp-fr, cp297): Remove charset
aliases, they are not really needed.
* lisp/language/english.el (ibm275): Move from here...
* lisp/language/european.el (ibm275): ...to here.
Timo Myyrä [Thu, 24 Dec 2020 15:29:49 +0000 (17:29 +0200)]
Add support for more EBCDIC code pages IBM2XX
There was already charset file present in etc/charsets for IBM2XX
character sets but there wasn't definitions for them in Emacs.
Add character set and coding system definitions for them.
* lisp/language/japanese.el (ibm281, ibm290):
* lisp/language/european.el (ibm256, ibm273, ibm274, ibm277)
(ibm278, ibm280, ibm284, ibm285, ibm297):
* lisp/language/english.el (ibm275): New coding systems.
* lisp/international/mule-conf.el (ibm256, ibm273, ibm274)
(ibm275, ibm277, ibm278, ibm280, ibm281, ibm284, ibm285, ibm290)
(ibm297): New charsets.
Eli Zaretskii [Fri, 25 Dec 2020 13:17:19 +0000 (15:17 +0200)]
Don't compile Gnulib's 'free' on MinGW
* nt/mingw-cfg.site (gl_cv_func_free_preserves_errno): Set to
"yes" to avoid compiling Gnulib's free.c in the MinGW build.
Eli Zaretskii [Fri, 25 Dec 2020 12:51:20 +0000 (14:51 +0200)]
Revert "Import posix_spawn from Gnulib."
This reverts commit
3ba34141da77a24c251ee6530f3f72a366fe556e.
It breaks the MinGW build and should be first tested on a
branch.
Eli Zaretskii [Fri, 25 Dec 2020 12:50:25 +0000 (14:50 +0200)]
Revert "Use posix_spawn if possible."
This reverts commit
2c79a8f9210db01c86b0e5f236adeb0509519d30.
It breaks the MinGW build in too many ways, and should be
first tested on a branch.
Philipp Stephani [Fri, 25 Dec 2020 10:39:09 +0000 (11:39 +0100)]
Use posix_spawn if possible.
posix_spawn is less error-prone than vfork + execve, and can make
better use of system-specific enhancements like 'clone' on Linux. Use
it if we don't need to configure a pseudoterminal.
* src/Makefile.in (LIB_POSIX_SPAWN): New variable.
(LIBES): Use it.
* src/callproc.c (emacs_spawn): Use posix_spawn on Unix-like system if
we don't need to set up a pseudoterminal.
Philipp Stephani [Fri, 25 Dec 2020 10:33:02 +0000 (11:33 +0100)]
Import posix_spawn from Gnulib.
posix_spawn is less error-prone than vfork + exec, and can make use of
system-specific optimizations like `clone' on Linux. Import Gnulib
replacement so that we can use recent additions like
`posix_spawn_file_actions_addchdir'.
The only manual change are to admin/merge-gnulib and .gitignore. All
other changes are due to rerunning merge-gnulib.
* admin/merge-gnulib (GNULIB_MODULES): Add posix_spawn-related
modules.
* .gitignore: Add new generated files.
Paul Eggert [Fri, 25 Dec 2020 10:33:29 +0000 (02:33 -0800)]
Update Gnulib.
All changes in this commit are autogenerated by running
admin/merge-gnulib.
Paul Eggert [Fri, 25 Dec 2020 10:15:45 +0000 (02:15 -0800)]
Adjust test_module to recent Gnulib changes
* test/Makefile.in ($(test_module)): Also compile lib/free.c
if it is needed to define rpl_free.
Paul Eggert [Fri, 25 Dec 2020 09:38:31 +0000 (01:38 -0800)]
Adjust to recent Gnulib changes
The latest Gnulib merge brought in free-posix, which causes 'free'
to preserve errno. This lets us simplify some Emacs code that
calls 'free'.
* admin/merge-gnulib (GNULIB_MODULES): Add free-posix.
This module is pulled in by canonicalize-lgpl anyway,
so we might as well rely on it.
* lib-src/emacsclient.c (get_current_dir_name):
Sync better with src/sysdep.c.
* lib-src/etags.c (process_file_name, etags_mktmp):
* lib-src/update-game-score.c (unlock_file):
* src/fileio.c (file_accessible_directory_p):
* src/sysdep.c (get_current_dir_name_or_unreachable):
Simplify by assuming that 'free' preserves errno.
* src/alloc.c (malloc_unblock_input):
Preserve errno, so that xfree preserves errno.
* src/sysdep.c (get_current_dir_name_or_unreachable):
Simplify by using strdup instead of malloc+memcpy.
No need for realloc (and the old code leaked memory anyway on
failure); just use free+malloc.
Paul Eggert [Fri, 25 Dec 2020 08:27:37 +0000 (00:27 -0800)]
Pacify gcc 10.2 -Wanalyzer-null-argument in gtkutil.c
* src/gtkutil.c (xg_item_label_same_p): Simplify. Without this
simplification, GCC (Ubuntu 10.2.0-13ubuntu1)
-Wanalyzer-null-argument complains about use of NULL where
non-null expected as argument of strcmp.
Eli Zaretskii [Fri, 25 Dec 2020 08:30:02 +0000 (10:30 +0200)]
Add more details to the "word processor" section
* etc/TODO (Emacs as word processor): Add more details based on
recent discussions.
E. Choroba [Fri, 25 Dec 2020 06:02:01 +0000 (07:02 +0100)]
cperl-mode: Correctly syntax highlight index/value array slices
* lisp/progmodes/cperl-mode.el (cperl-init-faces): %array[0, 1]
should use the array face, not the hash one (bug#45373).
Copyright-paperwork-exempt: yes
Thibault Polge [Fri, 25 Dec 2020 05:44:40 +0000 (06:44 +0100)]
Make `remove-hook' interactive
* lisp/subr.el (remove-hook): Make `remove-hook' interactive
(bug#45393).
Lars Ingebrigtsen [Fri, 25 Dec 2020 04:58:09 +0000 (05:58 +0100)]
Allow `string-limit' to work on encoded strings
* doc/lispref/strings.texi (Creating Strings): Document it.
* lisp/emacs-lisp/subr-x.el (string-limit): Allow limiting on
encoded strings.
Lars Ingebrigtsen [Fri, 25 Dec 2020 04:16:46 +0000 (05:16 +0100)]
Remove `string-slice' -- it's not very well defined
* doc/lispref/strings.texi (Creating Strings): Ditto.
* lisp/emacs-lisp/subr-x.el (string-slice): Remove.
Lars Ingebrigtsen [Thu, 24 Dec 2020 17:42:27 +0000 (18:42 +0100)]
Unbreak the build on *BSD and Macos after previous gnulib merge
* lib/Makefile.in (DEPFLAGS): Unbreak build on BSD derivatives by
writing all deps files into a single directory (instead of
deps/malloc/*.c).
Eli Zaretskii [Thu, 24 Dec 2020 16:32:54 +0000 (18:32 +0200)]
; * src/callproc.c (emacs_spawn) [!WINDOWSNT]: Fix last change.
Eli Zaretskii [Thu, 24 Dec 2020 16:17:57 +0000 (18:17 +0200)]
Fix the MinGW build broken by Gnulib update
* nt/mingw-cfg.site (gl_cv_func_readlink_trailing_slash)
(gl_cv_func_readlink_truncate): Define to "yes" to avoid compiling
readlink.c.
Eli Zaretskii [Thu, 24 Dec 2020 15:58:51 +0000 (17:58 +0200)]
Unbreak the MinGW build broken by recent changes in callproc.c
* src/w32.h (set_process_dir):
* src/w32proc.c (set_process_dir): Change the argument to 'const
char *'.
* src/lisp.h (make_environment_block):
* src/callproc.c (make_environment_block): Now returns 'char **'.
(exec_failed) [DOS_NT]: Remove unused function.
* src/callproc.c (child_setup): NEW_ARGV and ENV are now 'char **'.
Making them 'const' breaks the MinGW build and is not needed for
other platforms.
* src/callproc.c (emacs_spawn): ARGV and ENVP arguments are now
'char *', for the same reason.
* src/process.c (create_process): Adapt to above changes.
Philipp Stephani [Thu, 24 Dec 2020 15:48:40 +0000 (16:48 +0100)]
Update Gnulib.
All changes in this commit are autogenerated by running
admin/merge-gnulib.
Philipp Stephani [Thu, 24 Dec 2020 15:30:53 +0000 (16:30 +0100)]
Ensure that Gnulib objects in subdirectories are built correctly.
* lib/Makefile.in (.c.o): Add missing -o option.
Philipp Stephani [Thu, 24 Dec 2020 14:27:45 +0000 (15:27 +0100)]
Centralize subprocess creation in a single function.
Getting the vfork + execve combination right isn't easy, and the code
was partially duplicated between callproc.c and process.c. Centralize
the spawn operation in a single function that deals with the nasty
details. Going forward, we should be able to use posix_spawn from
either libc or Gnulib (or CreateProcessW on Windows) in the non-pty
case.
* src/callproc.c (emacs_spawn): New function to start an asynchronous
subprocess. Merge code from 'call_process' and 'create_process' into
this function.
(call_process): Use new 'emacs_spawn' function.
(child_setup): Make static, since there are no users outside this
compilation unit left.
(CHILD_SETUP_TYPE): Move from header file, since there are no users
outside this compilation unit left.
* src/process.c (create_process): Use new 'emacs_spawn' function.
Alan Mackenzie [Thu, 24 Dec 2020 11:29:27 +0000 (11:29 +0000)]
CC Mode: introduce a new cache for brace structures. This fixes bug #45248
Also fix three infinite loops. The new cache accelerates backward searches
for struct beginnings in c-looking-at-or-maybe-in-bracelist.
* lisp/progmodes/cc-engine.el (c-beginning-of-statement-1): In the final loop
over unary operators, add a check (> (point) lim) to avoid certain infinite
loops.
(c-beginning-of-decl-1): In the first loop add a similar check on point and
lim.
(c-laomib-loop): New function extracted from
c-looking-at-or-maybe-in-bracelist.
(c-laomib-cache): New buffer local variable.
(c-laomib-get-cache, c-laomib-put-cache, c-laomib-fix-elt)
(c-laomib-invalidate-cache): New functions which implement the cache.
(c-looking-at-or-maybe-in-bracelist): Replace two invocations of
c-go-up-list-backwards with calls to c-parse-state. Extract the new function
c-laomib-loop. Insert code which calls c-laomib-loop minimally, with the help
of the new cache.
* lisp/progmodes/cc-mode.el (c-basic-common-init): Initialise the new cach
(at mode start).
(c-before-change): Invalidate the new cache.
(c-fl-decl-start): Add an extra check (> (point) bod-lim) to prevent looping.
Determine the enclosing brace to pass as arguments to
c-looking-at-or-maybe-in-bracelist.
Stefan Monnier [Wed, 23 Dec 2020 23:31:28 +0000 (18:31 -0500)]
* src/dispnew.c (sit_for): Fix bug#45292
When reading, prefer staying in the selected-window over preserving
the current-buffer.
Stefan Monnier [Mon, 21 Dec 2020 04:21:51 +0000 (23:21 -0500)]
* lisp/emacs-lisp/lisp-mnt.el (lm-section-end): Stop at the right heading
`lisp-outline-level` assumes the match-data is that set by
`outline-regexp`.
TEC [Wed, 23 Dec 2020 21:34:35 +0000 (22:34 +0100)]
authinfo-mode: add option to not hide any elements (and add font-lock)
* lisp/auth-source.el (authinfo-hide-elements): New user option.
(authinfo--keywords): New variable.
(authinfo-mode): Use it.
(authinfo--hide-passwords): Use doc-face instead of warning for
the passwords.
(authinfo--toggle-display): Ditto.
Adam Porter [Sun, 13 Dec 2020 05:54:28 +0000 (05:54 +0000)]
* lisp/tab-line.el: New options, faces, and functions
* lisp/tab-line.el:
(tab-line-tab-face-functions): New option.
(tab-line-tab-inactive-alternate): New face.
(tab-line-tab-special): New face.
(tab-line-tab-face-inactive-alternating): New function.
(tab-line-tab-face-special): New function.
(tab-line-format-template): Use them.
* etc/NEWS: Update.
With thanks to Juri Linkov and Eli Zaretskii for their guidance.
Philipp Stephani [Wed, 23 Dec 2020 18:15:56 +0000 (19:15 +0100)]
* src/Makefile.in (DO_CODESIGN): Fix expected architecture name.
Philipp Stephani [Wed, 23 Dec 2020 16:40:18 +0000 (17:40 +0100)]
Declare argument vector as char *const *.
This matches the signature of execve.
* src/callproc.c (child_setup): Declare NEW_ARGV as char *const *.
Philipp Stephani [Wed, 23 Dec 2020 16:34:26 +0000 (17:34 +0100)]
* .clang-format (ColumnLimit): Fix line length.
Itai Seggev [Tue, 24 Nov 2020 05:52:27 +0000 (06:52 +0100)]
Codesign the executable on recene MacOS systems
* src/Makefile.in (temacs$(EXEEXT)): Codesign the executable on
recent (ARM) MacOS systems (bug#43878). Without this, building
Emacs fails.
Copyright-paperwork-exempt: yes
Lars Ingebrigtsen [Mon, 14 Sep 2020 10:34:56 +0000 (12:34 +0200)]
Support build of Emacs on ARM Macos machines
* configure.ac: Add support for aarch64-* on Macos (i.e., 64-bit
ARM) (bug#43369).
Philipp Stephani [Wed, 23 Dec 2020 15:26:57 +0000 (16:26 +0100)]
Pass C string pointer to current directory to 'child_setup'.
This avoids the impression that 'child_setup' could do anything
Lisp-related.
* src/callproc.c (child_setup): Pass C pointer to current directory
name.
(call_process): Adapt callers.
* src/process.c (create_process): Adapt callers.
Philipp Stephani [Wed, 23 Dec 2020 14:55:23 +0000 (15:55 +0100)]
Allocate environment block before forking.
While 'child_setup' carefully avoids calls to async-signal-unsafe
functions like 'malloc', it seems simpler and less brittle to use
normal allocation outside the critical section between 'fork' and
'exec'.
* src/callproc.c (make_environment_block): New function to create the
environment block for subprocesses. Code largely extracted from
'child_setup' and adapted to use 'xmalloc' instead of 'alloca'.
(child_setup): Remove environment block allocation in favor of
passing the environment block as command-line argument.
(call_process): Adapt to new calling convention.
* src/process.c (create_process): Adapt to new calling convention.
Philipp Stephani [Wed, 23 Dec 2020 11:00:46 +0000 (12:00 +0100)]
Reject filenames containing NUL bytes.
Such filenames are dangerous, as Emacs would silently only use the
part up to the first NUL byte. Reject them explicitly instead.
* src/coding.c (encode_file_name_1): New helper function.
(encode_file_name): Check that encoded filename doesn't contain a
NUL byte.
(syms_of_coding): Define 'filenamep' symbol.
* test/src/fileio-tests.el (fileio-tests/null-character): New unit
test.
* etc/NEWS: Document change.
Philipp Stephani [Wed, 23 Dec 2020 10:43:37 +0000 (11:43 +0100)]
Remove an unused parameter from 'child_setup' function.
* src/callproc.c (child_setup): Remove unused SET_PGRP parameter.
* src/callproc.c (call_process):
* src/process.c (create_process): Fix all callers.