Juri Linkov [Wed, 28 Jul 2021 16:40:23 +0000 (19:40 +0300)]
Improve :type of defcustom 'context-menu-functions' and add documentation.
* 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.
Juri Linkov [Tue, 27 Jul 2021 20:48:07 +0000 (23:48 +0300)]
Add new context-menu options for menus "File At Point" and "Version Control".
* 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.
Juri Linkov [Wed, 21 Jul 2021 18:40:11 +0000 (21:40 +0300)]
Change the order of context-menu-functions and add more context menus.
* 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.
Juri Linkov [Tue, 20 Jul 2021 20:48:43 +0000 (23:48 +0300)]
Add new mode context-menu-mode and use it in info.el and goto-addr.el
* 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.
* lisp/emacs-lisp/bytecomp.el (byte-compile--cond-switch-prefix):
Treat (not VAR) and (null VAR) as (eq VAR nil) when computing the
extent of switch ops.
Improve auto-revert-mode and revert-buffer doc strings
* lisp/autorevert.el (auto-revert-mode):
* lisp/files.el (revert-buffer): Mention that there is
revert-buffer-with-fine-grain that is better suited for markers
preservation (bug#49661).
Ioannis Kappas [Tue, 20 Jul 2021 13:53:34 +0000 (15:53 +0200)]
Allow installing packages with DOS line endings
* lisp/emacs-lisp/package.el (package-install-from-buffer): Allow
installing files with different line ending conventions (Unix, DOS
and Macos) (bug#48137).
Signal an error in json.c function if not available
* src/json.c (Fjson_serialize, Fjson_insert)
(Fjson_parse_string, Fjson_parse_buffer, syms_of_json): Signal
`json-unavailable' if jansson isn't available (bug#48228).
* lisp/minibuffer.el (minibuffer-quit-recursive-edit): New function.
* lisp/simple.el (minibuffer-error-function): Do not abort keyboard
macro execution if is minibuffer-quit is signaled (bug#48603).
* src/data.c (syms_of_data): New error symbol `minibuffer-quit'
* src/keyboard.c (recursive_edit_1): Implement throwing of function
values to `exit`. In that case, the function will be called without
arguments before returning from the command loop.
(cmd_error):
(Fcommand_error_default_function): Do not abort keyboard macro
execution if minibuffer-quit is signaled.
(command_loop_2): New argument HANDLERS.
* src/macros.c (Fexecute_kbd_macro): Use command_loop_2 instead of
command_loop_1.
Earl Hyatt [Sat, 19 Jun 2021 12:30:31 +0000 (08:30 -0400)]
Add commands 'kill-matching-lines' and 'copy-matching-lines'
* doc/emacs/search.texi: Document these additions.
* lisp/replace.el:
Add the commands 'kill-matching-lines' and 'copy-matching-lines'.
'kill-matching-lines' is like 'flush-lines', but adds the lines to the
kill ring as a single string, keeping line endings.
'copy-matching-lines' is like 'kill-matching-lines', but only copies
those lines instead of killing them.
* lisp/wdired.el (wdired--before-change-fn):
(wdired--restore-properties): Widen before doing anything so that
we get all the changed bits (bug#49124).
Make the `s' command in *Help* work for Lisp variables defined in C
* lisp/help-fns.el (describe-variable): Store the type.
* lisp/help-mode.el (help-view-source): Use the type. This fixes
the problem when looking for a variable defined in a C file.
Make make-indirect-buffer inherit inhibit-buffer-hook from base buffer
* src/buffer.c (Fmake_indirect_buffer):
Match base buffer's inhibit-buffer-hooks.
* test/src/buffer-tests.el (buffer-tests-inhibit-buffer-hooks-indirect):
Add a test (bug#49160).
* lisp/progmodes/compile.el (compilation-parse-errors):
Don't omit messages from the error count when FILE is a function
rather than a regexp match number.
The internal representation of columns uses half-open intervals but
don't expose that in the test cases, where we want to use the same
numbers as in the compilation messages.
* lisp/pcmpl-unix.el (pcomplete/xargs): Add support for completing xargs
options, including the ability to distinguish them from the command
xargs runs (bug#49603).
Copyright-paperwork-exempt: yes
Make 'n'/'p' work again in shortdoc after previous changes
* lisp/emacs-lisp/shortdoc.el (shortdoc--goto-section): Adjust to
changes in how the text properties are inserted in 22a5482ab6
(bug#49605). Also make into a regular function.
* lisp/emacs-lisp/eieio.el (initialize-instance):
Do not evaluate initform of a slot when initarg for the slot is provided,
according to the following secitons of CLHS:
- Object Creation and Initialization
- Initialization Arguments
- Defaulting of Initialization Arguments
- Rules for Initialization Arguments
* test/lisp/emacs-lisp/eieio-etests/eieio-tests.el:
Add corresponding tests
Fix a typo
7ac411ae2c (origin/emacs-27) ; * src/data.c (Fcar, Fcdr): Doc fix. 0d9e1826f7 One more minor update of the Emacs manual for 19th printing 92616d30e0 ; Fix let-alist Texinfo markup c13acf8e34 ; * doc/emacs/mule.texi (International Chars): Mention 'de...
* lisp/progmodes/bug-reference.el (bug-reference-setup-from-vc-alist):
Add support for codeberg.org bug and pull request references.
* doc/emacs/maintaining.texi (Bug Reference): Mention that bug and
pull request references for codeberg projects are supported.
* lisp/progmodes/bug-reference.el (bug-reference-setup-from-vc-alist):
Add support for bug references like #17 and ~user/project#19 for
sourcehut (sr.ht).
* doc/emacs/maintaining.texi (Bug Reference): Document sourcehut
support.
Ori [Thu, 15 Jul 2021 16:57:38 +0000 (18:57 +0200)]
; * lisp/help-fns.el: Speed up `describe-mode'
* lisp/help-fns.el (help-fns--list-local-commands): Speed up (bug#49579).
A predicate checks if there are no key bindings for a given function. A
full list of bindings is not needed, even a single binding is sufficient
to say the function is bound. Set FIRSTONLY arg in where-is-internal so
this predicate runs faster, with functional equivalence. For some
configurations this has a noticeable improvement on the speed of
describe-mode.
Improve the shortdoc link action in *Help* buffers
* lisp/emacs-lisp/shortdoc.el (shortdoc-display-group): Allow
taking an optional parameter to place point on a specific function.
(shortdoc--display-function): Go to the function in question in
the shortdoc buffer.
Allow restoring the original order in 'tabulated-list-mode'
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-sort): Allow
restoring the original order (bug#13411).
(tabulated-list--sort-by-column-name): Store the original order.
(tabulated-list--original-order): New buffer-local variable.
* doc/misc/modus-themes.org (Enable and load): Include internal link.
(Sample configuration for use-package): Update code sample.
(Customization Options): Update references to customization options.
(Option for more italic constructs): Document new variable, as an
alias of the deprecated 'modus-themes-slanted-constructs'.
(Option for syntax highlighting, Option for links)
(Option for command prompt styles, Option for mode line presentation)
(Option for language checkers)
(Option for line highlighting (hl-line-mode))
(Option for parenthesis matching (show-paren-mode))
(Option for active region, Option for the headings' overall style):
Update documentation to describe new possible values, expressed as a
list of symbols.
(Option for Org agenda constructs): Document new user option.
(Control the scale of headings): Update symbol of variable.
(Remap face with local value (DIY), Backdrop for pdf-tools (DIY)):
Tweak text of internal reference.
(Font configurations for Org and others (DIY)): Add internal link and
document how to configure the 'bold' and 'italic' faces.
(Custom Org user faces (DIY)): Minor corrections or changes to single
words.
(Full support for packages or face groups): Include new items.
(Notes on individual packages): Add notes on Avy hints, the colour of
days in 'M-x calendar', and underlines in 'compilation-mode' buffers.
(What is the best setup for legibility?): Remove single word.
(Acknowledgements): Update list of contributors.
(modus-themes-scale-5, modus-themes-scale-title): Deprecate variable
and replace it with alias 'modus-themes-scale-title'.
(modus-themes-slanted-constructs, modus-themes-italic-constructs):
Deprecate variable and replace it with alias
'modus-themes-italic-constructs'.
(modus-themes-org-habit, modus-themes-org-agenda): Deprecate variable
and make its functionality a part of 'modus-themes-org-agenda'.
(modus-themes-headings, modus-themes-mode-line, modus-themes-diffs)
(modus-themes-prompts, modus-themes-paren-match, modus-themes-syntax)
(modus-themes-links, modus-themes-region, modus-themes-lang-checkers)
(modus-themes-org-blocks): Make user options accept a value as a list
of properties.
(modus-themes--mixed-fonts, modus-themes--slant)
(modus-themes--fixed-pitch, modus-themes--lang-check)
(modus-themes--prompt, modus-themes--paren)
(modus-themes--syntax-foreground, modus-themes--syntax-extra)
(modus-themes--syntax-string, modus-themes--syntax-docstring)
(modus-themes--syntax-comment, modus-themes--heading-p)
(modus-themes--heading, modus-themes--org-habit)
(modus-themes--mode-line-attrs, modus-themes--link-color)
(modus-themes--link, modus-themes--region, modus-themes--hl-line):
Update internal functions to parse new values for user options.
* etc/themes/modus-operandi-theme.el,
etc/themes/modus-vivendi-theme.el: Bump version number.
A detailed change log is provided here (no javascript required):
<https://protesilaos.com/codelog/2021-07-15-modus-themes-1-5-0/>.