summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix compilation on MS-Windowsscratch/posix-spawn-no-gnulibEli Zaretskii2020-12-311-0/+2
| | | | | * src/callproc.c (emacs_spawn) <fork_done>: Define the label only if USABLE_POSIX_SPAWN is defined, to avoid a compiler warning.
* Use posix_spawn if possible.Philipp Stephani2020-12-302-1/+205
| | | | | | | | | | | | | | | | | 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. * configure.ac (HAVE_SPAWN_H, HAVE_POSIX_SPAWN) (HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR) (HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR_NP) (HAVE_POSIX_SPAWNATTR_SETFLAGS, HAVE_DECL_POSIX_SPAWN_SETSID): New configuration variables. * src/callproc.c (USABLE_POSIX_SPAWN): New configuration macro. (emacs_posix_spawn_init_actions) (emacs_posix_spawn_init_attributes, emacs_posix_spawn_init): New helper functions. (emacs_spawn): Use posix_spawn if possible.
* Use standard key symbols in NS menu entriesMattias Engdegård2020-12-301-10/+60
| | | | | | * src/nsmenu.m (skipspc): Remove. (key_symbols, prettify_key): New. ([EmacsMenu fillWithWidgetValue:]): Call prettify_key.
* ; * src/nsmenu.m: Undo unintentional changeMattias Engdegård2020-12-301-2/+2
|
* Remove redundant 'function's around lambda in align.elStefan Kangas2020-12-301-86/+70
| | | | | | * lisp/align.el (align-rules-list, align-exclude-rules-list) (align-vhdl-rules-list, align-highlight-rule): Remove redundant 'function's around lambda.
* Add 'project-relative' as value for 'xref-file-name-display'Dmitry Gutov2020-12-303-8/+76
| | | | | | | | | | | | | | | * lisp/progmodes/xref.el (xref-file-name-display): Document new value. (xref-location-group ((l xref-file-location))): Handle the new value. (xref--project-root): Extract from the default method of 'xref-backend-references' so it can be used in above's new code. Also fix an old bug in the "backward compat" branch. * lisp/progmodes/xref.el (xref--project-root-memo): New variable. * test/lisp/progmodes/xref-tests.el: Add test cases for the three possible settings of 'xref-file-name-display'. Co-authored-by: Tobias Rittweiler <trittweiler@gmail.com>
* Fix some over-wide docstringsStefan Kangas2020-12-3027-63/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/cedet/semantic/analyze/refs.el (semantic-analyze-refs-proto) (semantic-analyze-refs-impl): * lisp/cedet/semantic/symref.el (semantic-symref-hit-to-tag-via-buffer): * lisp/emacs-lisp/chart.el (chart-axis-draw): * lisp/emacs-lisp/cl-macs.el (cl-defstruct, cl-loop): * lisp/emacs-lisp/eieio-core.el (eieio--add-new-slot): * lisp/eshell/em-unix.el (eshell/info): * lisp/gnus/deuglify.el (gnus-outlook-rearrange-article): * lisp/gnus/gnus-agent.el (gnus-agent-read-article-number): * lisp/gnus/gnus-util.el (gnus-put-overlay-excluding-newlines) (gnus-put-text-property-excluding-newlines): * lisp/gnus/message.el (message-sort-headers): * lisp/gnus/nntp.el (nntp-with-open-group) (nntp-with-open-group-function): * lisp/gnus/nnvirtual.el (nnvirtual-create-mapping): * lisp/mail/feedmail.el (feedmail-fiddle-list-of-fiddle-plexes) (feedmail-queue-reminder, feedmail-mail-send-hook-splitter): * lisp/net/dictionary.el (dictionary-do-matching): * lisp/obsolete/longlines.el (longlines-auto-wrap): * lisp/org/ob-sql.el (org-babel-sql-dbstring-vertica): * lisp/org/ol-bbdb.el (org-bbdb-date-list): * lisp/progmodes/cc-cmds.el (c-mark-function): * lisp/progmodes/cperl-mode.el (cperl-add-tags-recurse) (cperl-add-tags-recurse-noxs-fullpath) (cperl-add-tags-recurse-noxs): * lisp/progmodes/etags.el (tags-search): * lisp/progmodes/verilog-mode.el (verilog-delete-auto-buffer) (verilog-auto-re-search-do, verilog-expand-vector-internal): * lisp/textmodes/reftex-parse.el (reftex-init-section-numbers): * lisp/textmodes/reftex-toc.el (reftex-toc-load-all-files-for-promotion): * lisp/textmodes/sgml-mode.el (html-mode): * lisp/textmodes/table.el (table--transcoord-cache-to-table) (table--transcoord-table-to-cache, table--remove-eol-spaces) (table--region-in-cell-p, table-goto-bottom-right-corner) (table-split-cell-horizontally): * lisp/url/url-handlers.el (url-insert): * lisp/vc/ediff-util.el (ediff-inferior-compare-regions): Fix doc strings to not exceed 80-column limits. (Bug#44858)
* Plug NS memory leaks (bug#45502)Mattias Engdegård2020-12-301-6/+7
| | | | | * src/nsmenu.m ([EmacsMenu addItemWithWidgetValue:attributes:]): Mark allocated and owned objects for autorelease.
* Add variables read-char-choice-use-read-key and y-or-n-p-use-read-keyJuri Linkov2020-12-306-44/+94
| | | | | | | | | | | | | | | | | | * lisp/subr.el (read-char-choice-use-read-key): New variable. (read-char-choice): Use read-char-from-minibuffer when read-char-choice-use-read-key is nil. (y-or-n-p-use-read-key): New variable. (y-or-n-p): Restore old code that calls read-key to use it when y-or-n-p-use-read-key is non-nil. * lisp/dired-aux.el (dired--no-subst-ask, dired-query): * lisp/files.el (files--ask-user-about-large-file) (hack-local-variables-confirm): * lisp/userlock.el (ask-user-about-supersession-threat): * lisp/wid-edit.el (widget-choose): Revert to use read-char-choice instead of read-char-from-minibuffer. https://lists.gnu.org/archive/html/emacs-devel/2020-12/msg01919.html
* * src/dbusbind.c (XD_BASIC_DBUS_TYPE): Fix error in declaration.Michael Albinus2020-12-301-15/+28
|
* In Isearch bind 'C-s M-y' to isearch-yank-pop-only with old code (bug#45483)Juri Linkov2020-12-302-7/+29
| | | | | | | * lisp/isearch.el (isearch-menu-bar-yank-map, isearch-mode-map): (isearch-forward): Use isearch-yank-pop-only instead of isearch-yank-pop. (isearch-yank-pop): Mention isearch-yank-pop-only. (isearch-yank-pop-only): New command with old body from Emacs 27.
* ; * etc/NEWS: Move entry to correct heading.Stefan Kangas2020-12-301-5/+5
|
* Minor cleanup in keymap.cStefan Kangas2020-12-301-136/+72
| | | | | | | | | | * src/keymap.c (get_keymap, keymap_parent, Fset_keymap_parent) (store_in_keymap, Fdefine_key, Flookup_key, define_as_prefix) (silly_event_symbol_error, current_minor_maps) (Fcurrent_active_maps, Fkey_binding, Flocal_key_binding) (Fminor_mode_key_binding, Fdefine_prefix_command) (Faccessible_keymaps, Fdescribe_buffer_bindings) (describe_vector, Fwhere_is_internal): Minor cleanup.
* Also count symbol plists in memory-reportLars Ingebrigtsen2020-12-301-0/+12
| | | | | | * lisp/emacs-lisp/memory-report.el (memory-report--symbol-plist): New function. (memory-report): Use it.
* Revert "Switch add-to-ordered-list to eql"Lars Ingebrigtsen2020-12-303-5/+3
| | | | | | This reverts commit b4fd857ead728a06380250c5336c1ab94a7c2f7a. I misunderstood the purposed of the function.
* ; Fix my previous commitStefan Kangas2020-12-301-1/+1
| | | | | * test/src/chartab-tests.el (chartab-test-char-table-extra-slot): Fix test.
* Add some char-table testsStefan Kangas2020-12-301-0/+20
| | | | | | | * test/src/chartab-tests.el (chartab-test-char-table-p) (chartab-test-char-table-subtype) (chartab-test-char-table-parent) (chartab-test-char-table-extra-slot): New tests.
* Switch add-to-ordered-list to eqlLars Ingebrigtsen2020-12-303-3/+5
| | | | | | * doc/lispref/lists.texi (List Variables): Update documentation. * lisp/subr.el (add-to-ordered-list): Switch to eql (bug#45539).
* Improve the `long' computation of `mode-line-compact'Lars Ingebrigtsen2020-12-301-2/+1
| | | | | | * src/xdisp.c (display_mode_line): Compute `long' based on total window width, and use the passed-in window instead of the selected window.
* Add caveat about the `long' `mode-line-compact' settingLars Ingebrigtsen2020-12-301-2/+4
| | | | | * doc/lispref/modes.texi (Mode Line Basics): Elaborate on the `long' setting.
* Minor refactoring of xref-testsTobias Rittweiler2020-12-301-16/+22
| | | | | | | | * test/lisp/progmodes/xref-tests.el (xref-tests-data-dir): Rename to 'xref-tests--data-dir'. (xref-tests--matches-in-data-dir, xref-tests--locations-in-data-dir): New functions. Factored out from test cases and updated usage sites to use them.
* Don't calculate macOS menu data for GNUstep (bug#45502)Alan Third2020-12-291-5/+13
| | | | | * src/nsmenu.m ([EmacsMenu fillWithWidgetValue:]): #ifdef out code that has no effect on GNUstep and autorelease alloc'd objects.
* * src/Makefile.in (DO_CODESIGN): Fix architecture for Apple SiliconArtem Loenko2020-12-291-1/+1
|
* Use explicit "--color=auto" in grep mode to support both GNU grep and ripgrepJuri Linkov2020-12-291-4/+4
| | | | | | * lisp/progmodes/grep.el (grep-highlight-matches): (grep-compute-defaults, grep-expand-template): Use "--color=auto" instead of "--color" (bug#44983).
* * lisp/x-dnd.el (x-dnd-get-drop-x-y): Add safer check for top/left (bug#45277)Juri Linkov2020-12-291-2/+4
|
* A better fix for process-tests on MS-WindowsEli Zaretskii2020-12-292-2/+8
| | | | | | | | | * src/w32.c (pipe2): When forcibly closing pipe handles due to overflow of FD_SETSIZE, set the handles to -1, to avoid assertion violations in emacs_close. * test/src/process-tests.el (process-tests/fd-setsize-no-crash): No need to skip this test anymore.
* Fix process-tests on MS-WindowsEli Zaretskii2020-12-291-0/+1
| | | | | | * test/src/process-tests.el (process-tests/fd-setsize-no-crash): Skip this test on windows-nt systems, as we cannot use more than FD_SETSIZE file descriptors there: if we try, we crash.
* xref-show-definitions-completing-read: Tune up completionDmitry Gutov2020-12-292-3/+12
| | | | | | | | | | * lisp/minibuffer.el (completion-category-defaults) Use 'substring' completion style for 'xref-location' category by default. * lisp/progmodes/xref.el (xref-show-definitions-completing-read): Assign the 'xref-location' category to the completions. Pass REQUIRE-MATCH=t.
* Instrument process-tests.el for timeouts on embaMichael Albinus2020-12-291-19/+38
|
* Add a regression test for Bug#24325.Philipp Stephani2020-12-291-0/+35
| | | | | * test/src/process-tests.el (process-tests/fd-setsize-no-crash): New unit test.
* More readable keys in NS menu entries (bug#45502)Mattias Engdegård2020-12-292-49/+61
| | | | | | | | | | | | | Each menu entry now has the key binding in a right-aligned column, as an attempt to improve readability. Previously the keys were given in brackets immediately following the menu string. * src/nsmenu.m ([EmacsMenu parseKeyEquiv:]): Remove. (skipspc): New helper function. ([EmacsMenu addItemWithWidgetValue:]): Add attributes argument. Use attributed title string. Don't special-case Super bindings. ([EmacsMenu fillWithWidgetValue:]): Compute maximum width. Prepare attributes for title.
* Sync with Tramp 2.5.0Michael Albinus2020-12-294-25/+38
| | | | | | | | | | | | * doc/misc/trampver.texi: * lisp/net/trampver.el: Change version to "2.5.0". * test/lisp/net/tramp-tests.el (tramp--test--deftest-direct-async-process): Check, that `make-process' supports file name handlers. Suppress `internal-default-process-sentinel'. (tramp--test-async-shell-command): Set `proc' proper. (tramp-test32-shell-command-direct-async): Tag it :unstable.
* Revert "Allow the flymake mode line indicator to be customized"João Távora2020-12-293-109/+96
| | | | | | | | This reverts commit 37049ee78c4576d340781179317e6cbaaf73b6c3. It's not ready to be used, contains some fundamental errors. See bug#33740.
* Fix crash in NS menu codeAlan Third2020-12-291-0/+9
| | | | | | * src/nsmenu.m (ns_update_menubar): When the menu generation code was copied from xmenu.c the fix for waiting_for_input was lost. Reinstate it.
* Add some tests for align.elLars Ingebrigtsen2020-12-295-0/+71
|
* * src/xdisp.c (display_mode_line): I guess FALSE should be false.Glenn Morris2020-12-281-1/+1
|
* Revert the previous display_string changeLars Ingebrigtsen2020-12-291-24/+20
| | | | | | * src/xdisp.c (display_string): Revert adding the additional ignore_text_properties parameter -- it was already covered by the other mix of parameters.
* Fix compact mode line text propertiesLars Ingebrigtsen2020-12-291-14/+27
| | | | | * src/xdisp.c (display_mode_line): Display the compact mode correctly (with text properties) (bug#45520).
* Add a parameter to display_string to allow not ignoring text propsLars Ingebrigtsen2020-12-291-19/+26
| | | | | | * src/xdisp.c (display_string): Add a parameter to allow not ignoring text properties (bug#45520). Adjust callers throughout xdisp.c.
* Introduce new variable mode-line-compactLars Ingebrigtsen2020-12-293-3/+61
| | | | | | | * 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.
* Allow the flymake mode line indicator to be customizedLars Ingebrigtsen2020-12-293-96/+109
| | | | | | | | * 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.
* Add a SPLIT parameter to `format-spec'Lars Ingebrigtsen2020-12-294-45/+85
| | | | | | | * 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).
* Reword a long docstring in cc-langs.elBasil L. Contovounesios2020-12-291-6/+8
| | | | | | * 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).
* Add a reference between the Strings node and Search/ReplaceLars Ingebrigtsen2020-12-291-1/+4
| | | | | * doc/lispref/strings.texi (Creating Strings): Mention string-replace/replace-regexp-in-string (bug#45516).
* Allow mixing attributes and comments in the diary fileLars Ingebrigtsen2020-12-291-12/+12
| | | | | | * 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).
* Robustify completion match scoring for optimized patternsJoão Távora2020-12-281-21/+27
| | | | | | | | | | | | | | | | | | | | | | | | 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
* CC Mode: Add newish AWK Mode facilities, as used in gawk-4.Alan Mackenzie2020-12-284-18/+89
| | | | | | | | | | | | | | | | | | | | * 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.
* * lisp/minibuffer.el: Avoid consecutive `any` in completion patternsStefan Monnier2020-12-281-1/+2
| | | | | | (completion-pcm--optimize-pattern): Turn multiple consecutive occurrences of `any` into just a single one. Suggested by Dario Gjorgjevski <dario.gjorgjevski@gmail.com>.
* Fix package tests for tetris no longer existing as a packageGlenn Morris2020-12-281-3/+3
| | | | | | * 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:.
* Fix crash in NS menu codeAlan Third2020-12-281-55/+46
| | | | | | | * 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.