summaryrefslogtreecommitdiff
path: root/lisp
Commit message (Collapse)AuthorAgeFilesLines
...
| * Improve :type of defcustom 'context-menu-functions' and add documentation.Juri Linkov2021-07-281-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | * doc/emacs/frames.texi (Menu Mouse Clicks): Describe context-menu-mode and context-menu-functions instead of suggesting global-set-key. (Menu Bars): Mention context-menu-mode and context-menu-functions. * etc/NEWS: Add context-menu-mode and context-menu-functions. * lisp/mouse.el (context-menu-functions): Use :type with repeat/function-item. (context-menu-minor, context-menu-undo, context-menu-region) (context-menu-ffap): Improve docstrings displayed for function-item in defcustom of context-menu-functions.
| * Add new context-menu options for menus "File At Point" and "Version Control".Juri Linkov2021-07-276-33/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/mouse.el (context-menu-functions): Add more options. (context-menu-global, context-menu-local): Fix separators. (context-menu-minor): Rewrite to support list of submenus. (context-menu-vc, context-menu-ffap): New functions. (context-menu-undo, context-menu-region): Fix separators. * lisp/dired.el (dired-context-menu): * lisp/info.el (Info-context-menu): * lisp/net/goto-addr.el (goto-address-context-menu): * lisp/net/eww.el (eww-context-menu): * lisp/progmodes/prog-mode.el (prog-context-menu): Fix separators.
| * Improve docstring of context-menu-functions and add eww-context-menuJuri Linkov2021-07-216-20/+56
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/mouse.el (context-menu-functions): Explain function args in docstring. * lisp/net/eww.el (eww-context-menu): New function. (eww-mode): Add it to context-menu-functions. * lisp/info.el (Info-context-menu): Move history items higher. * lisp/progmodes/prog-mode.el (prog-context-menu): Add menu items in the middle of the menu after the region menu items.
| * Change the order of context-menu-functions and add more context menus.Juri Linkov2021-07-215-61/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/mouse.el (context-menu-functions): Update default list. (context-menu-overriding-function): Remove variable. (context-menu-map): Reverse the order. (context-menu-global, context-menu-local, context-menu-minor): New functions. (context-menu-undo, context-menu-region): Add separators. Use define-key-after instead of bindings--define-key. (context-menu-entry): New variable. (context-menu-mode): Use it. * lisp/dired.el (dired-context-menu): New function. (dired-mode): Add it to context-menu-functions. * lisp/info.el (Info-context-menu): Reorder. * lisp/net/goto-addr.el (goto-address-at-mouse): Rename from goto-address-at-click. (goto-address-context-menu): Use goto-address-at-mouse. * lisp/progmodes/prog-mode.el (prog-context-menu): New function. (prog-mode): Add it to context-menu-functions.
| * Add new mode context-menu-mode and use it in info.el and goto-addr.elJuri Linkov2021-07-203-3/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/mouse.el (context-menu-functions): New defcustom. (context-menu-overriding-function): New function. (context-menu-filter-function): New defcustom. (context-menu-map): New function. (context-menu-undo, context-menu-region): New menu functions. (context-menu-mode): New mode. * lisp/info.el (Info-context-menu): New function. (Info-mode): Add Info-context-menu to context-menu-functions. * lisp/net/goto-addr.el (goto-address-context-menu): New function. (goto-address-at-click): New command. (goto-address-mode): Add goto-address-context-menu to context-menu-functions.
* | ruby-mode imenu: Support methods with modifiersDmitry Gutov2021-08-171-2/+2
| | | | | | | | | | | | * lisp/progmodes/ruby-mode.el (ruby-imenu-create-index-in-block): Support methods with modifiers (visibility or otherwise) (bug#50079).
* | vc-git-region-history: Fix to call 'diff' more correctlyDmitry Gutov2021-08-171-1/+1
| | | | | | | | | | * lisp/vc/vc-git.el (vc-git-region-history): Fix to pass a list to the backend 'diff' command (bug#39452).
* | Make icomplete-vertical-mode take immediate effect (bug#49075)João Távora2021-08-161-1/+14
| | | | | | | | | | | | | | | | * etc/NEWS: Mention change. * lisp/icomplete.el (icomplete-vertical-mode): (fido-vertical-mode): Tweak docstring. Turn on icomplete-mode. and fido-mdoe
* | Merge from origin/emacs-27Glenn Morris2021-08-162-7/+10
|\ \ | | | | | | | | | | | | | | | | | | | | | 9664ee182c (origin/emacs-27) C++ Mode: Don't confuse the pointer oper... b3aec9ee48 CC Mode: Fix unstable fontification of doc strings. # Conflicts: # lisp/progmodes/cc-fonts.el
| * | C++ Mode: Don't confuse the pointer operator -> with the type indicating ->Alan Mackenzie2021-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | | This fixes bug #47468. * lisp/progmodes/cc-engine.el (c-looking-at-inexpr-block): While searching backwards for "->" which is a type indicating operator, disallow also commas.
| * | CC Mode: Fix unstable fontification of doc strings.Alan Mackenzie2021-08-151-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Also optimize a loop over several line doc-comments. * lisp/progmodes/cc-fonts.el (c-font-lock-doc-comments): New variable comment-mid, used as the starting point for applying c-doc-face-name in a line comments. In block comments, apply this face not from `comment-beg' but from `region-beg', no earlier than the start of the fontification region.
* | | Fix cursor movement on the Linux console with certain charactersLars Ingebrigtsen2021-08-161-0/+3
| | | | | | | | | | | | | | | | | | * lisp/term/linux.el (terminal-init-linux): Switch off auto-compositions, because they confuse cursor movement on the Linux console (bug#21363).
* | | Minor clarification for define-minor-mode :variableLars Ingebrigtsen2021-08-161-3/+3
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): * doc/lispref/modes.texi (Defining Minor Modes): Clarify what the setter function should do (bug#14875).
* | | Remove prettification for \par in tex-modeClément Pit-Claudel2021-08-161-1/+0
| | | | | | | | | | | | | | | | | | | | | * lisp/textmodes/tex-mode.el (tex--prettify-symbols-alist): Remove prettified version of `\par'. Many fonts don't display anything for the character it was mapped to (#x2029 PARAGRAPH SEPARATOR), so enabling prettification makes every `\par' disappear (bug#50073).
* | | Add new functions to replace strings/regexp in a regionLars Ingebrigtsen2021-08-162-0/+67
| | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/searching.texi (Search and Replace): Document them. * lisp/subr.el (replace-string-in-region) (replace-regexp-in-region): New functions. * lisp/emacs-lisp/shortdoc.el (regexp, buffer): Mention them.
* | | Don't remove `fontified' in nxml--buffer-substring-filterLars Ingebrigtsen2021-08-161-3/+1
| | | | | | | | | | | | | | | * lisp/nxml/nxml-mode.el (nxml--buffer-substring-filter): Removing `fontified' is probably unnecessary (bug#50061).
* | | Fix regressions in the last changeDmitry Gutov2021-08-162-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/vc/vc-git.el (vc-git-register): Use file names verbatim with 'git update-index', as it only accepts file names, not pathspecs (bug#39452). * lisp/vc/vc.el (vc-print-root-log): Expand ROOTDIR, so that vc-git-print-log doesn't receive an abbreviated name. Literal pathspecs don't work with those.
* | | * lisp/simple.el (shift-select-mode): Add new choice 'permanent' (bug#50038).Juri Linkov2021-08-151-2/+14
| | | | | | | | | | | | (handle-shift-selection): Handle new choice 'permanent'.
* | | * lisp/tab-bar.el (tab-bar-new-button-show): Make variable obsolete.Juri Linkov2021-08-151-0/+1
| | |
* | | * lisp/nxml/nxml-mode.el (nxml-mode): Use add-functionStefan Monnier2021-08-151-13/+12
| | | | | | | | | | | | | | | | | | | | | This avoids calling the internal function `buffer-substring--filter` from `nxml.el`. (nxml--buffer-substring-filter): Adjust accordingly.
* | | Filter out rng-state elements in nxml-mode buffers from the kill ringLars Ingebrigtsen2021-08-151-0/+14
| | | | | | | | | | | | | | | | | | * lisp/nxml/nxml-mode.el (nxml--buffer-substring-filter): Filter out `rng-state' objects (bug#50061). (nxml-mode): Set `filter-buffer-substring-function'.
* | | Sort by recency in flex completion style when no flexy stuff happeningJoão Távora2021-08-151-21/+33
| | | | | | | | | | | | | | | | | | | | | | | | Fixes: bug#49888 * minibuffer.el (completion--flex-adjust-metadata): Fall back to usual alphanumeric, length, recency strategy if no minibuffer input. There is still a bug indicated by the nearby FIXMEs, though.
* | | Allow evaluating Python code across machinesAugusto Stoffel2021-08-151-1/+2
| | | | | | | | | | | | | | | * python.el (python-shell-send-string): Ensure that the temporary file is created in the host running the Python process (bug#50057).
* | | Run execute-extended-command key binding suggestion from a timerLars Ingebrigtsen2021-08-151-9/+20
| | | | | | | | | | | | | | | | | | * lisp/simple.el (execute-extended-command): Run the key binding suggestion from a timer instead of in the program flow -- this allows `post-command-hook' to be executed immediately (bug#50042).
* | | Mark up commands in shortdoc.el for modesMasahiro Nakamura2021-08-151-5/+6
| | | | | | | | | | | | | | | * lisp/emacs-lisp/shortdoc.el: Add command mode tagging (bug#50064).
* | | Fix bug#50063 when using icomplete-fido-kill with C-x p pJoão Távora2021-08-151-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | C-x p p utilizes a completion table "category" which is 'project-file' icomplete-fido-kill only functioned for 'buffer' and 'file', and failed with a non-informative message when something else was used. * lisp/icomplete.el (icomplete-fido-kill): Support 'project-file' class. Use cl-case, instead of pcase.
* | | Fix vc-git-state for filenames with wildcardsWolfgang Scherer2021-08-151-27/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/vc/vc-git.el: (vc-git--literal-pathspec-inner), (vc-git--literal-pathspec), (vc-git--literal-pathspecs) new functions to add ":(literal)" pathspec magic (bug#39452). (vc-git-registered), (vc-git-state), (vc-git-dir-status-goto-stage), (vc-git-register), (vc-git-unregister), (vc-git-checkin), (vc-git-find-revision), (vc-git-checkout), (vc-git-revert), (vc-git-conflicted-files), (vc-git-print-log), (vc-git-diff), (vc-git-previous-revision), (vc-git-next-revision), (vc-git-delete-file), (vc-git-rename-file) functions vc-git--literal-pathspec, vc-git--literal-pathspecs applied.
* | | Revert "Bind the GIT_LITERAL_PATHSPECS environment variable"Dmitry Gutov2021-08-151-2/+0
| | | | | | | | | | | | | | | | | | | | | This reverts commit a2d0ff26005c5c10ffe0d84bd8b458a06828be82. It was found to break a certain use case, and we decided to go with the other solution (bug#39452).
* | | * lisp/emacs-lisp/easymenu.el (easy-menu-do-define): Fix bug#50051Stefan Monnier2021-08-141-8/+6
| | | | | | | | | | | | | | | This corrects the quite confused conversion to closure done in commit a070bd1c8b5213ad469d41dd80d392f924644aed.
* | | * lisp/progmodes/cc-engine.el (c-ml-string-in-end-delim): Rewrite functionAlan Mackenzie2021-08-141-20/+42
| | |
* | | Filter out -L foo labels in diff-hunk-file-namesLars Ingebrigtsen2021-08-141-5/+5
| | | | | | | | | | | | | | | * lisp/vc/diff-mode.el (diff-hunk-file-names): Filter out "-L foo" labels (bug#10160).
* | | Make lm-crack-address less strictLars Ingebrigtsen2021-08-141-13/+5
| | | | | | | | | | | | | | | * lisp/emacs-lisp/lisp-mnt.el (lm-crack-address): Use mail-header-parse-address-lax (bug#50049).
* | | Add new functions for lax mail address splittingLars Ingebrigtsen2021-08-143-1/+44
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/subr-x.el (string-clean-whitespace): Autoload. * lisp/mail/mail-parse.el (mail-header-parse-addresses-lax) (mail-header-parse-address-lax): New functions.
* | | Add macro `seq-setq`.Earl Hyatt2021-08-141-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/sequences.texi (seq-setq): Document this macro. * lisp/emacs-lisp/seq.el (seq-setq): New macro. * test/lisp/emacs-lisp/seq-tests.el (test-seq-setq): Test this macro (bug#50053).
* | | Fix memory-report counting of vector/hash table sizesYikai Zhao2021-08-141-4/+1
| | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/memory-report.el (memory-report--object-size-1): Count element values in vectors and hash tables. Copyright-paperwork-exempt: yes
* | | Fix merging of ambiguous nil mapsBasil L. Contovounesios2021-08-141-23/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/map.el: Bump version to 3.1. (map--merge): New merging subroutine that uses a hash table in place of lists, for both efficiency and avoiding ambiguities (bug#49848). (map-merge): Rewrite in terms of map--merge. (map-merge-with): Ditto. This ensures that FUNCTION is called whenever two keys are merged, even if they are not eql (which could happen until now). It also makes map-merge-with consistent with map-merge, thus achieving greater overall predictability. * etc/NEWS: Announce this weakening of guarantees. * test/lisp/emacs-lisp/map-tests.el (test-map-merge) (test-map-merge-with): Don't depend on specific orderings. Test that nil is correctly merged into a plist.
* | | Add font-lock-doc-markup-face (bug#50041)Mattias Engdegård2021-08-142-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This face is intended for mark-up syntax and constructs inside text using font-lock-doc-face; ie, documentation comments and strings in programming modes. * lisp/font-lock.el (font-lock-doc-markup-face): New face. * lisp/cus-theme.el (custom-theme--listed-faces): Add it to the list. * doc/lispref/modes.texi (Faces for Font Lock): Document it. * etc/NEWS: Mention it.
* | | CC Mode: Fix a bug in yesterday's patchAlan Mackenzie2021-08-131-0/+1
| | | | | | | | | | | | | | | | | | * lisp/progmodes/cc-mode.el (c-before-change-check-unbalanced-strings): Check the language has multi-line strings before calling c-ml-string-opener-at-or-around-point.
* | | Make `debug' reset `inhibit-read-only' while runningLars Ingebrigtsen2021-08-131-1/+5
| | | | | | | | | | | | | | | * lisp/emacs-lisp/debug.el (debug): Bind `inhibit-read-only' to nil in case we're in a context that has bound it to t (bug#26947).
* | | Adjust previous diff-changed-unspecified changeLars Ingebrigtsen2021-08-131-4/+6
| | | | | | | | | | | | | | | * lisp/vc/diff-mode.el (diff-changed-unspecified): Adjust the definition to Emacs 28 (bug#26969).
* | | Add new face diff-changed-unspecifiedLars Ingebrigtsen2021-08-131-4/+15
| | | | | | | | | | | | | | | * lisp/vc/diff-mode.el (diff-changed-unspecified): New face. (diff-font-lock-keywords): Use it (bug#26969).
* | | permanently-enabled-local-variables doc string clarificationLars Ingebrigtsen2021-08-131-1/+1
| | | | | | | | | | | | | | | * lisp/files.el (permanently-enabled-local-variables): Clarify what kind of local variables this refers to.
* | | Make info-look search harder for the Python info fileLars Ingebrigtsen2021-08-131-3/+8
| | | | | | | | | | | | | | | * lisp/info-look.el (python-mode): Try harder to find the correct info file (bug#31405).
* | | Unknown line endings in filepos-to-bufferpos/bufferpos-to-lineposLars Ingebrigtsen2021-08-131-4/+21
| | | | | | | | | | | | | | | | | | | | | * lisp/international/mule-util.el (filepos-to-bufferpos): Give better errors on `exact' with unknown line endings, and guess at Unix if `approximate' (bug#36573). (bufferpos-to-filepos): Ditto.
* | | Remove :group from defcustoms in image-dired.elLars Ingebrigtsen2021-08-131-92/+45
| | | | | | | | | | | | * lisp/image-dired.el: Remove :group from the defcustoms throughout.
* | | Don't disable transient mark mode when changing image facesPeter Münster2021-08-131-9/+7
| | | | | | | | | | | | | | | * lisp/image-dired.el (image-dired-thumb-update-marks): Keep the mark state when changing faces. (bug#49999).
* | | * lisp/tab-bar.el (tab-bar-history-buttons-show): Remove defcustom.Juri Linkov2021-08-131-11/+4
| | | | | | | | | | | | | | | | | | (tab-bar-format-history): Don't use this recently added variable because now it's possible to customize the option 'tab-bar-format' to remove 'tab-bar-format-history' from it that gives the same result.
* | | Add save-some-buffers-root to save-some-buffers-default-predicate (bug#46374)Juri Linkov2021-08-131-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/files.el (save-some-buffers-default-predicate): Add choice 'save-some-buffers-root'. (save-some-buffers-root): New predicate function. (save-some-buffers): Check if 'pred' returns a lexically-bound lambda, then use it as 'pred'. Thanks to Tino Calancha <tino.calancha@gmail.com>
* | | CC Mode: Enhance C++ Mode raw strings to multi-line strings for any languageAlan Mackenzie2021-08-125-581/+1196
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/cc-defs.el (cadar, caddr, cdddr): Add defsubsts for these for when they are missing from the host Emacs. (c-point): Add new `position' 'boll "beginning of logical line". (c-clear-char-properties): Return the position of the lowest removed property. * lisp/progmodes/cc-engine.el (c-full-pp-to-literal): Fix for rare case where LIMIT < START in parse-partial-sexp. (c-old-beg-rs, c-old-end-rs, c-raw-string-end-delim-disrupted) (c-raw-string-pos, c-raw-string-in-end-delim, c-depropertize-raw-string) (c-depropertize-raw-strings-in-region, c-before-change-check-raw-strings) (c-propertize-raw-string-id, c-propertize-raw-string-opener): Old functions and variables removed or renamed "raw" -> "ml" and adapted. (c-old-beg-ml, c-old-1-beg-ml, c-old-end-ml, c-beg-pos, c-end-pos) (c-ml-string-end-delim-disrupted, c-depropertize-ml-string-delims) (c-ml-string-delims-around-point,c-position-wrt-ml-delims) (c-before-change-check-ml-strings, c-after-change-unmark-ml-strings) (c-maybe-re-mark-ml-string, c-propertize-ml-string-id) (c-propertize-ml-string-opener, c-depropertize-ml-string) (c-depropertize-ml-strings-in-region): New functions and variables adapted and possibly renamed from "raw" -> "ml". (c-ml-string-make-closer-re, c-ml-string-make-opener-re) (c-c++-make-ml-string-closer-re, c-c++-make-ml-string-opener-re) (c-get-ml-closer, c-ml-string-opener-around-point) (c-ml-string-opener-intersects-region, c-ml-string-opener-at-or-around-point) (c-ml-string-back-to-neutral, c-ml-string-in-end-delim, c-neutralize-pos) (c-neutralized-prop): New functions and variables. * lisp/progmodes/cc-fonts.el (c-basic-matchers-before): Replace c-font-lock-raw-strings with c-font-lock-ml-strings. (c-font-lock-ml-strings): New function taking the place of the old c-font-lock-ml-strings. * lisp/progmodes/cc-langs.el (c-get-state-before-change-functions): Move c-depropertize-CPP to the second item of the C++ entry, and replace c-before-change-check-raw-strings by c-before-change-check-ml-strings. Add a new entry for Pike Mode. (c-before-font-lock-functions): (Replace c-after-change-unmark-raw-strings by c-after-change-unmark-ml-strings in the C++ entry, and add a new entry for Pike Mode. (c-ml-string-backslash-escapes, c-ml-string-non-punc-skip-chars) (c-ml-string-opener-re, c-ml-string-max-opener-len, c-ml-string-any-closer-re) (c-ml-string-max-closer-len, c-ml-string-max-closer-len-no-leader) (c-ml-string-back-closer-re, c-make-ml-string-closer-re-function) (c-make-ml-string-opener-re-function, c-ml-string-cpp-or-opener-re) (c-cpp-or-ml-match-offset): New c-lang-defconsts and c-land-defvars. (c-multiline-string-start-char): Remove the Pike Mode setting. * lisp/progmodes/cc-mode.el (c-depropertize-CPP): Test for general ml strings rather than C++ raw strings. (c-unescaped-nls-in-string-p): Handle languages with ml strings. (c-clear-string-fences): Fix bug with wrong parenthesisation. (c-before-change-check-unbalanced-strings) (c-after-change-mark-abnormal-strings, c-after-change-escape-NL-in-string): Adapt for multi-line strings.
* | | Improve connection type `pipe' for remote processesMichael Albinus2021-08-123-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/misc/tramp.texi (Remote processes): New subsection "Remote process connection type". * lisp/net/tramp-adb.el (tramp-adb-handle-make-process): Use `tramp-process-connection-type' as default connection type. Improve check for `:connection-type'. * lisp/net/tramp-sh.el (tramp-sh-handle-make-process): Use `tramp-process-connection-type' as default connection type. Improve check for `:connection-type'. Send "stty -icrnl" when connection type is a pipe. * lisp/net/tramp.el (tramp-process-connection-type): Allow all possible values. (tramp-handle-make-process): Use `tramp-process-connection-type' as default connection type. Improve check for `:connection-type'. * test/lisp/net/tramp-tests.el (tramp-test30-make-process): Extend test.