aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix "first-differente" face in completion-pcm--hilit-commonalityscratch/bug-42149-funny-pcm-completion-scoresJoão Távora2020-12-291-5/+6
| | | | | | | | | | | | | | | | Fixes: bug#42149 Depending on the position of point in the completion and the completion style being used, it may or may not make sense for this face to appear immediately after point. This patch assumes that it should appear in the first non-matched character after point, which may likely be the next one to type to disambiguate between two or more completions. Suggested by Dario Gjorgjevski <dario.gjorgjevski@gmail.com>. * lisp/minibuffer.el (completion-pcm--hilit-commonality): Fix occasional misplacement of completions-first-differente.
* Robustify a helper function for test/lisp/minibuffer-tests.elJoão Távora2020-12-291-3/+6
| | | | | | | | 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.
* Make a completion test robust to custom completion stylesJoão Távora2020-12-291-1/+2
| | | | | * test/lisp/minibuffer-tests.el (completion-test1): Make test resilient to more completion styles.
* Add tests for bug#42149João Távora2020-12-291-0/+147
| | | | | | | | | | | | | | * 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>
* 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.
* Minor cleanups in tetris.elStefan Kangas2020-12-281-32/+14
| | | | | | * lisp/play/tetris.el: Remove redundant :group args. (tetris-get-tick-period): Drop unnecessary check. (tetris): Stylistic doc fixes.
* * lisp/ps-print.el (ps-message-log-max): Remove XEmacs compat code.Stefan Kangas2020-12-281-1/+0
|
* Remove redundant 'function's around lambda in vhdl-mode.elStefan Kangas2020-12-281-51/+44
| | | | | | | | * 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.
* Fix too-long feedmail-sendmail-f-doesnt-sell-me-out doc stringLars Ingebrigtsen2020-12-281-10/+13
| | | | | * lisp/mail/feedmail.el (feedmail-sendmail-f-doesnt-sell-me-out): Fold the example SMTP header using continuation folding.
* Fill some auto-generated docstringsStefan Kangas2020-12-283-38/+61
| | | | | | | | * 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.
* Make byte-compiler warn about wide docstringsStefan Kangas2020-12-2819-6/+233
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Make octave-send-region be asynchronousLars Ingebrigtsen2020-12-281-19/+3
| | | | | * lisp/progmodes/octave.el (octave-send-region): Send things asynchronously to the inferior process (bug#24492).
* Make XIM to work with non-CJK localesYichao Yu2020-12-282-33/+5
| | | | | | | | * 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.
* Fix background mode on Gnome 3.38 terminalsLars Ingebrigtsen2020-12-281-2/+5
| | | | | * lisp/term/xterm.el (xterm--version-handler): Adjust to Gnome 3.38 (bug#43891).
* Fix alignment of Java String[] and the likeLars Ingebrigtsen2020-12-281-1/+1
| | | | | | | | | | | | | | | | | * 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; }
* Document the text property limitations in mode linesLars Ingebrigtsen2020-12-281-4/+10
| | | | | * doc/lispref/modes.texi (Properties in Mode, Mode Line Basics): Mention the special text property limitations.
* Allow remember-notes to use the *scratch* bufferLars Ingebrigtsen2020-12-281-3/+8
| | | | | | * lisp/textmodes/remember.el (remember-notes): Allow the remember-notes buffer to use the *scratch* buffer (as documented) (bug#20740).
* Rename and document the built-in xref-show-definitions-function'sDmitry Gutov2020-12-282-9/+46
| | | | | | | * 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'.
* Do not output two spaces for non-autoloaded ieieo constructor functionsTim Landscheidt2020-12-281-2/+2
| | | | | | | | * 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
* * lisp/emacs-lisp/package.el (package-archives): Add NonGNU ELPAStefan Monnier2020-12-272-0/+5
|
* * lisp/textmodes/rst.el (rst-mode): Don't touch global hookStefan Monnier2020-12-271-4/+3
| | | | (rst-re): η-reduce.
* Remove NS menu synthesized events (bug#44333)Alan Third2020-12-273-415/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* ; Fix recent shortdoc.el and fns.c additionsBasil L. Contovounesios2020-12-272-4/+4
| | | | | * lisp/emacs-lisp/shortdoc.el (list): Fix typos. * src/fns.c (Flength_equal): Fix docstring.
* ; Fix the recent `length' doc string additionŠtěpán Němec2020-12-271-1/+1
|
* Fix up length_internal with degenerate length inputsLars Ingebrigtsen2020-12-272-2/+16
| | | | * src/fns.c (length_internal): Protect against edge conditions.
* Improve "find definition" in *Help* buffersDaniel Martín2020-12-273-1/+80
| | | | | | | | | * 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).
* Add new predicates for sequence lengthsLars Ingebrigtsen2020-12-276-2/+135
| | | | | | | | | | | | | * 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.
* Improve the edebug-form-data doc stringLars Ingebrigtsen2020-12-261-1/+1
| | | | | * lisp/emacs-lisp/edebug.el (edebug-form-data): Doc string clarification (bug#42776).
* * lisp/forms.el (forms--run-functions): New functionStefan Monnier2020-12-261-30/+33
| | | | | | | | | (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`.
* Fix test/src/process-tests on MS-WindowsEli Zaretskii2020-12-261-0/+6
| | | | | * src/process.c (network_lookup_address_info_1) [WINDOWSNT]: Initialize winsock.
* Rename Tramp method "media" to "mtp" (Bug#45402)Michael Albinus2020-12-263-30/+30
| | | | | | | | | | | | * 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)
* Avoid missing email messages due to rmail-spam-filteremacs-f2020-12-261-4/+13
| | | | | | | | | | * 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
* Improvements for `:base-uri' svg image propertyZajcev Evgeny2020-12-262-4/+12
| | | | | | | * src/image.c (svg_load): Use ENCODE_FILE for `:base-uri' * doc/lispref/display.texi (SVG Images): Add more documentation for `:base-uri'
* Fix messages with plural forms in todo-mode.elEli Zaretskii2020-12-261-12/+15
| | | | | | * lisp/calendar/todo-mode.el (todo-move-item, todo-item-undone) (todo-category-completions): Use 'ngettext' instead of hard-coding plural forms by hand.
* Fix issues with lib/malloc out-of-dir buildsPaul Eggert2020-12-252-3/+9
| | | | | | | | | | | | | | 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.