]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 years agoRe-organize and rewrite parts of the Flymake manual scratch/bug-50244
João Távora [Sun, 12 Sep 2021 21:16:35 +0000 (22:16 +0100)]
Re-organize and rewrite parts of the Flymake manual

bug#50244

* doc/misc/flymake.texi (Starting Flymake): New section.
(Finding diagnostics): New section, now contains info previously in
"Listing diagnostics"
(Mode line status): Renamed from "Mode-line syntax check status"
(Troubleshooting): Renamed from "Backend exceptions".
(Flymake error types): Tweak phrasing.

3 years agoAdd support for project-wide diagnostics in Flymake (bug#50244)
João Távora [Wed, 1 Sep 2021 22:45:53 +0000 (23:45 +0100)]
Add support for project-wide diagnostics in Flymake (bug#50244)

This is done with two new concepts: "foreign diagnostics" and
"list-only diagnostics".  The manual has been updated with a
description of these new concepts.

* doc/misc/flymake.texi (Flymake utility functions):
Explain creation of foreign diagnostics.
(Foreign and list-only diagnostics): New subsection.
(Listing diagnostics): New subsection.

* lisp/progmodes/flymake.el
(Version): Bump to 1.2.1
(project): Require project.
(flymake--diag): Add new slots 'orig-beg' and 'orig-end'.  Rename
'buffer' slot to 'locus'.
(flymake-make-diagnostic): Rework docstring.  Accept stringp
LOCUS arg.
(flymake-diagnostic-beg, flymake-diagnostic-end)
(flymake-diagnostic-buffer):  Simplify definition.
(flymake--equal-diagnostic-p): New helper
(flymake--highlight-line): Rework.  Accept FOREIGN arg.
(flymake--state): Work docstring. Add new slot 'foreign-diags'
(flymake--handle-report): Call
flymake--update-diagnostics-listings.
(flymake--handle-report): New helper.
(flymake--mode): Forward declare.
(flymake--handle-report): Rework for foreign diagnostics.
(flymake-mode): When turning on, notice any Flymake diagnostics
for current buffer.  When turning off update diagnostics listings.
(flymake-kill-buffer-hook): Turn off flymake explicitly before
killing.
(flymake--mode-line-counter): Use flymake-diagnostics to collect
diagnostics.
(flymake-show-diagnostic): Visit buffer of file-specific
diagnostic.
(flymake--tabulated-entries-1): New helper extracted from
flymake--diagnostic-buffer-entries.
(flymake--diagnostics-buffer-entries): Rework.
(flymake--diagnostics-base-tabulated-list-format): New helper.
(flymake--diagnostics-buffer-name): Adjust.
(flymake-list-only-diagnostics): New variable.
(flymake--project-diagnostic-list-project): New variable.
(flymake--clear-list-only-diagnostics): New helper.
(flymake-project-diagnostics-mode): New major mode.
(flymake--project-diagnostics)
(flymake--project-diagnostics-entries)
(flymake--project-diagnostics-buffer): New helpers.
(flymake-show-project-diagnostics): New command.
(flymake--update-diagnostics-listings): New helper.
(flymake-show-buffer-diagnostics): Renamed from flymake-diagnostics-buffer.

* etc/NEWS: Mention change.

3 years agoBump lisp/progmodes/project.el version to 0.7.1
João Távora [Mon, 13 Sep 2021 16:43:43 +0000 (17:43 +0100)]
Bump lisp/progmodes/project.el version to 0.7.1

Amont other things exposes the new project-buffers generic function to
ELPA users.

* lisp/progmodes/project.el (Version): Bump to 0.7.1

3 years agoKeep and report "foreign" diangnostics in flymake-cc Flymake backend
João Távora [Mon, 30 Aug 2021 15:24:25 +0000 (16:24 +0100)]
Keep and report "foreign" diangnostics in flymake-cc Flymake backend

This includes diagnostics for .h files that sprang up when checking a
c file.  Those diagnostics are reported to the Flymake infrastructure
which does not (yet) do anything with them.

This includes a change to the test fixtures, too.

* lisp/progmodes/flymake-cc.el (flymake-cc--make-diagnostics): Rework

* test/lisp/progmodes/flymake-resources/another-problematic-file.c:
  New file.

* test/lisp/progmodes/flymake-resources/some-problems.h:
  Add a function declaration..

3 years agoAbbreviate Flymake backend name in flymake-show-diagnostics-buffer
João Távora [Fri, 3 Sep 2021 18:03:51 +0000 (19:03 +0100)]
Abbreviate Flymake backend name in flymake-show-diagnostics-buffer

* lisp/progmodes/flymake.el (flymake--diagnostics-buffer-entries):
(flymake-diagnostics-buffer-mode): Report abbreviated backend, too.

3 years agoUnbreak M-x compile-defun of functions using flymake-log
João Távora [Tue, 31 Aug 2021 17:32:58 +0000 (18:32 +0100)]
Unbreak M-x compile-defun of functions using flymake-log

* lisp/progmodes/flymake.el (flymake-log): Check if compilation unit
  is indeed a string before treating it as a file name.

3 years agoRefactor some Flymake functions
João Távora [Tue, 31 Aug 2021 17:43:12 +0000 (18:43 +0100)]
Refactor some Flymake functions

* lisp/progmodes/flymake.el (flymake-diagnostic-buffer): New
helper.
(flymake-diagnostic-beg, flymake-diagnostic-end): Tweak docstring.
(flymake--handle-report): Simplify.
(flymake--publish-diagnostics): Helper for flymake--handle-report.
(flymake--mode-line-counter, flymake-show-diagnostic)
(flymake--diagnostics-buffer-entries): Use
flymake-diagnostic-buffer, flymake-diagonstic-type,
flymake-diagnostic-beg.

3 years agoRename flymake--backend-state to flymake--state
João Távora [Sun, 29 Aug 2021 21:35:46 +0000 (22:35 +0100)]
Rename flymake--backend-state to flymake--state

The previous name was confusing and akward and dreadful to type and
read.

* lisp/progmodes/flymake.el (flymake--state): Rename from
flymake--backend-state.
(flymake--with-backend-state): Use flymake--state.
(flymake--handle-report): Use flymake--state.
(flymake--collect): Use flymake--state.
(flymake-running-backends): Use flymake--state.
(flymake--disable-backend): Use flymake--state.
(flymake--run-backend): Use flymake--state.
(flymake-start): Use flymake--state.
(flymake-mode): Use flymake--state.
(flymake--mode-line-title): Use flymake--state.
(flymake--mode-line-exception): Use flymake--state.
(flymake--mode-line-counter): Use flymake--state.

3 years agoRemove duplication of `find` file pattern arguments
Mattias Engdegård [Mon, 13 Sep 2021 16:38:59 +0000 (18:38 +0200)]
Remove duplication of `find` file pattern arguments

* lisp/cedet/semantic/symref/grep.el
(semantic-symref-derive-find-filepatterns): Avoid including the same
pattern twice.

3 years ago* Clean-up some unnecessary macro usage in comp.c
Andrea Corallo [Mon, 13 Sep 2021 14:43:33 +0000 (16:43 +0200)]
* Clean-up some unnecessary macro usage in comp.c

* src/comp.c (emit_static_object)
(Fcomp_native_driver_options_effective_p, add_driver_options)
(Fcomp__compile_ctxt_to_file, Fcomp_libgccjit_version): Clean-up
unenecessary 'defined (WINDOWSNT)' usage.

3 years agoContinue NEWS tag checking
Lars Ingebrigtsen [Mon, 13 Sep 2021 14:18:30 +0000 (16:18 +0200)]
Continue NEWS tag checking

3 years agoFix typo in previous files.el change
Lars Ingebrigtsen [Mon, 13 Sep 2021 13:32:20 +0000 (15:32 +0200)]
Fix typo in previous files.el change

3 years agoMention unibyte issues in insert-file-contents-literally doc string
Lars Ingebrigtsen [Mon, 13 Sep 2021 13:17:02 +0000 (15:17 +0200)]
Mention unibyte issues in insert-file-contents-literally doc string

* lisp/files.el (insert-file-contents-literally): Mention possible
issues with multibyte buffers (bug#50560).

3 years ago* doc/lispref/variables.texi (named-let): Document TCO
Stefan Monnier [Mon, 13 Sep 2021 13:14:05 +0000 (09:14 -0400)]
* doc/lispref/variables.texi (named-let): Document TCO

3 years agoFix the tests
Dmitry Gutov [Mon, 13 Sep 2021 12:47:45 +0000 (15:47 +0300)]
Fix the tests

* test/lisp/progmodes/xref-tests.el
(xref--xref-file-name-display-is-abs)
(xref--xref-file-name-display-is-nondirectory)
(xref--xref-file-name-display-is-relative-to-project-root):
Update for the latest change in xref.el.

3 years agoUse a fringe mark in bookmark instead of a whole background line
Lars Ingebrigtsen [Mon, 13 Sep 2021 11:35:53 +0000 (13:35 +0200)]
Use a fringe mark in bookmark instead of a whole background line

* lisp/bookmark.el (bookmark-face): Adjust colors.
(bookmark-fringe-mark): New bitmap.
(bookmark--fontify): Use a fringe instead of marking the whole line.
(bookmark--unfontify): Adjust to remove.
(bookmark--jump-via): Ditto.
(bookmark-set-fringe-mark): Renamed from bookmark-fontify.
(bookmark--set-fringe-mark, bookmark--remove-fringe-mark): Renamed
from --*fontify.  Callers adjusted.

3 years agoNEWS copy edits and tagging
Lars Ingebrigtsen [Mon, 13 Sep 2021 11:02:16 +0000 (13:02 +0200)]
NEWS copy edits and tagging

3 years agoCorrect nroff-mode NEWS entry after `M-o' changes
Lars Ingebrigtsen [Mon, 13 Sep 2021 10:56:15 +0000 (12:56 +0200)]
Correct nroff-mode NEWS entry after `M-o' changes

3 years agoMention how to disable auto-fill-mode in the auto-fill section
Lars Ingebrigtsen [Mon, 13 Sep 2021 10:41:34 +0000 (12:41 +0200)]
Mention how to disable auto-fill-mode in the auto-fill section

* doc/lispref/text.texi (Margins): Mention how to disable
auto-fill-mode.

3 years agoDocument backtrace-on-error-noninteractive in the --batch section
Lars Ingebrigtsen [Mon, 13 Sep 2021 10:35:50 +0000 (12:35 +0200)]
Document backtrace-on-error-noninteractive in the --batch section

* doc/emacs/cmdargs.texi (Initial Options): Mention
backtrace-on-error-noninteractive.

3 years agoFurther NEWS tagging updates
Lars Ingebrigtsen [Mon, 13 Sep 2021 10:32:10 +0000 (12:32 +0200)]
Further NEWS tagging updates

3 years agocompletions-annotations doc string clarification
Lars Ingebrigtsen [Mon, 13 Sep 2021 10:20:57 +0000 (12:20 +0200)]
completions-annotations doc string clarification

* lisp/minibuffer.el (completions-annotations): Mention that it's
not always used.

3 years agoUpdate some more NEWS tagging
Lars Ingebrigtsen [Mon, 13 Sep 2021 10:13:01 +0000 (12:13 +0200)]
Update some more NEWS tagging

3 years agoMention `benchmark-call' in the manual
Lars Ingebrigtsen [Mon, 13 Sep 2021 10:08:58 +0000 (12:08 +0200)]
Mention `benchmark-call' in the manual

* doc/lispref/debugging.texi (Profiling): Mention `benchmark-call'.

3 years agoUpdate some pcase NEWS tags for already-documented functions
Lars Ingebrigtsen [Mon, 13 Sep 2021 09:59:56 +0000 (11:59 +0200)]
Update some pcase NEWS tags for already-documented functions

3 years agoUpdate NEWS tagging for string helper functions
Lars Ingebrigtsen [Mon, 13 Sep 2021 09:58:56 +0000 (11:58 +0200)]
Update NEWS tagging for string helper functions

3 years agoDocument named-let and update some NEWS tags
Lars Ingebrigtsen [Mon, 13 Sep 2021 09:53:18 +0000 (11:53 +0200)]
Document named-let and update some NEWS tags

* doc/lispref/variables.texi (Local Variables): Document `named-let'.

3 years agoClarify bookmark-fontify NEWS entry
Lars Ingebrigtsen [Mon, 13 Sep 2021 08:40:56 +0000 (10:40 +0200)]
Clarify bookmark-fontify NEWS entry

3 years agopackage-menu-execute doc string clarification
Lars Ingebrigtsen [Mon, 13 Sep 2021 08:35:17 +0000 (10:35 +0200)]
package-menu-execute doc string clarification

* lisp/emacs-lisp/package.el (package-menu-execute): Say what
happens to upgrade-marked packages (bug#50551).

3 years ago* etc/NEWS: Clarify insert-into-buffer (bug#50558).
Lars Ingebrigtsen [Mon, 13 Sep 2021 08:29:08 +0000 (10:29 +0200)]
* etc/NEWS: Clarify insert-into-buffer (bug#50558).

3 years agoSupport mouse events clicked on the tab bar but outside of any tab (bug#41343)
Juri Linkov [Mon, 13 Sep 2021 08:14:32 +0000 (11:14 +0300)]
Support mouse events clicked on the tab bar but outside of any tab (bug#41343)

* lisp/tab-bar.el (tab-bar--key-to-number): Return non-nil non-numeric t
when no tab is used.  Return nil for current-tab.
(tab-bar-mouse-select-tab, tab-bar-mouse-close-tab): Do nothing
when tab-bar--key-to-number returns non-nil non-numeric t
for click events outside of any tab.
(tab-bar-mouse-context-menu): Add context menu when mouse is clicked
outside of tabs.  Add "Duplicate" alongside with "Close" to the menu
used when mouse is clicked on a tab.
(toggle-tab-bar-mode-from-frame, toggle-frame-tab-bar): Move code
closer to 'tab-bar-show'.

* src/xdisp.c (handle_tab_bar_click): Return Qtab_bar with empty list
when mouse is clicked on the tab bar but outside of any tab.

3 years agoOnly do multi-isearch in eww if there's next/prev links
Lars Ingebrigtsen [Mon, 13 Sep 2021 08:03:24 +0000 (10:03 +0200)]
Only do multi-isearch in eww if there's next/prev links

* lisp/net/eww.el (eww-handle-link): Only do multi-isearch if
there's a next/prev link in the HTML (bug#50497).
(eww-setup-buffer): Clear the function.
(eww-mode): Don't set it here.

3 years agoChange value of DEFAULT_TAB_BAR_BUTTON_MARGIN from 4 to 1 (bug#50424)
Juri Linkov [Mon, 13 Sep 2021 07:58:44 +0000 (10:58 +0300)]
Change value of DEFAULT_TAB_BAR_BUTTON_MARGIN from 4 to 1 (bug#50424)

3 years ago* doc/emacs/frames.texi (Tab Bars): Improve documentation.
Juri Linkov [Mon, 13 Sep 2021 07:56:51 +0000 (10:56 +0300)]
* doc/emacs/frames.texi (Tab Bars): Improve documentation.

3 years agoFix detection of char regions in print-fontset-element
Lars Ingebrigtsen [Mon, 13 Sep 2021 07:39:45 +0000 (09:39 +0200)]
Fix detection of char regions in print-fontset-element

* lisp/international/mule-diag.el (print-fontset-element): Fix the
regexp for "foo .. bar " (bug#50519).

3 years agoAdd some search-whitespace-regexp examples
Lars Ingebrigtsen [Mon, 13 Sep 2021 07:24:46 +0000 (09:24 +0200)]
Add some search-whitespace-regexp examples

* lisp/isearch.el (search-whitespace-regexp): Add some
alternatives in the defcustom.

3 years agoMention get-byte in shortdoc
Lars Ingebrigtsen [Mon, 13 Sep 2021 07:20:21 +0000 (09:20 +0200)]
Mention get-byte in shortdoc

* lisp/emacs-lisp/shortdoc.el (buffer): Mention `get-byte' here.

3 years agobug-reference.el: Adapt default debbugs bug regexp for IRC modes
Tassilo Horn [Mon, 13 Sep 2021 05:22:50 +0000 (07:22 +0200)]
bug-reference.el: Adapt default debbugs bug regexp for IRC modes

* lisp/progmodes/bug-reference.el (bug-reference-setup-from-irc-alist):
Adapt regexp so that group 1 defines overlay region.

3 years agobug-reference.el: Adapt default debbugs bug regexp for mail modes
Tassilo Horn [Mon, 13 Sep 2021 05:11:05 +0000 (07:11 +0200)]
bug-reference.el: Adapt default debbugs bug regexp for mail modes

* lisp/progmodes/bug-reference.el (bug-reference-setup-from-mail-alist):
Adapt regexp so that group 1 defines overlay region.

3 years agoDeclare unused function cperl-inside-parens-p obsolete
Stefan Kangas [Mon, 13 Sep 2021 04:29:54 +0000 (06:29 +0200)]
Declare unused function cperl-inside-parens-p obsolete

* lisp/progmodes/cperl-mode.el (cperl-inside-parens-p): Declare
unused function obsolete.

3 years ago; Minor doc fixes found by checkdoc
Stefan Kangas [Mon, 13 Sep 2021 04:04:32 +0000 (06:04 +0200)]
; Minor doc fixes found by checkdoc

3 years agoImprove checkdoc abbreviation handling
Stefan Kangas [Mon, 13 Sep 2021 04:03:44 +0000 (06:03 +0200)]
Improve checkdoc abbreviation handling

* lisp/emacs-lisp/checkdoc.el
(checkdoc-in-abbreviation-p): New helper function.
(checkdoc-sentencespace-region-engine): Fix handling abbreviations
after escaped parenthesis.

* test/lisp/emacs-lisp/checkdoc-tests.el
(checkdoc-tests-in-abbrevation-p)
(checkdoc-tests-in-abbrevation-p/with-parens)
(checkdoc-tests-in-abbrevation-p/with-escaped-parens): New tests.

3 years agoRemove some remaining references to XEmacs
Stefan Kangas [Mon, 13 Sep 2021 02:41:15 +0000 (04:41 +0200)]
Remove some remaining references to XEmacs

* lisp/allout.el (allout-overlay-preparations):
* lisp/cedet/semantic/decorate/include.el
(semantic-decoration-unknown-include-menu)
(semantic-decoration-fileless-include-menu):
* lisp/cedet/semantic/idle.el (semantic-idle-scheduler-setup-timers):
* lisp/vc/ediff-init.el:
* lisp/vc/ediff-util.el (ediff-mode): Remove some remaining references
to XEmacs.

3 years agoExtend xref-file-name-display to elisp and etags definitions
Dmitry Gutov [Sun, 12 Sep 2021 22:33:31 +0000 (01:33 +0300)]
Extend xref-file-name-display to elisp and etags definitions

And all other types of locations (with a looks-like-file-name check).

* lisp/progmodes/xref.el (xref--group-name-for-display): Extract
from xref-buffer-location's implementation of xref-location-group.
(xref-file-location): Define trivial reader for the 'file' slot.
(xref-location-group): Update docstring.
(xref--analyze): Use the new function here, to be able to format
group names coming from any location type.

3 years agoERC: Use 'string-replace' only on Emacs 28 and later
Amin Bandali [Sun, 12 Sep 2021 18:12:50 +0000 (14:12 -0400)]
ERC: Use 'string-replace' only on Emacs 28 and later

* lisp/erc/erc-dcc.el (erc-dcc-unquote-filename):
* lisp/erc/erc.el (erc-quit-reason-zippy, erc-part-reason-zippy)
(erc-update-mode-line-buffer, erc-message-english-PART): Use
'string-replace' only on Emacs 28 and later, otherwise use
'replace-regexp-in-string' on older Emacsen.

3 years agoERC: Use 'string-search' only on Emacs 28 and later
Amin Bandali [Sun, 12 Sep 2021 18:09:53 +0000 (14:09 -0400)]
ERC: Use 'string-search' only on Emacs 28 and later

* lisp/erc/erc-backend.el (erc-parse-server-response):
* lisp/erc/erc-dcc.el (erc-dcc-member):
* lisp/erc/erc-speedbar.el (erc-speedbar-expand-server)
(erc-speedbar-expand-channel, erc-speedbar-expand-user):
* lisp/erc/erc.el (erc-send-input): Use 'string-search' only on
Emacs 28 and later, otherwise use 'string-match' on older Emacsen.

3 years ago* lisp/tab-bar.el (tab-bar-get-buffer-tab): Use 'remq' instead of 'seq-remove'
Juri Linkov [Sun, 12 Sep 2021 18:30:06 +0000 (21:30 +0300)]
* lisp/tab-bar.el (tab-bar-get-buffer-tab): Use 'remq' instead of 'seq-remove'

3 years agoAllow region-related context menu to be used on selected region with one click
Juri Linkov [Sun, 12 Sep 2021 17:55:57 +0000 (20:55 +0300)]
Allow region-related context menu to be used on selected region with one click

* lisp/mouse.el (mouse-drag-track): Don't deactivate the mark for
the context menu invoked by down-mouse-3.

https://lists.gnu.org/archive/html/emacs-devel/2021-08/msg01577.html

3 years ago* lisp/thingatpt.el (thing-at-mouse): New function (bug#50256).
Juri Linkov [Sun, 12 Sep 2021 17:32:02 +0000 (20:32 +0300)]
* lisp/thingatpt.el (thing-at-mouse): New function (bug#50256).

* lisp/net/dictionary.el: Add 'context-menu-dictionary' to
'context-menu-functions'.
(dictionary-search-word-at-mouse): New function.
(context-menu-dictionary): New function that uses 'thing-at-mouse'.
(dictionary-mouse-popup-matching-words): Remove stray 'selected-window'.

* lisp/textmodes/flyspell.el (flyspell-context-menu): Add '_click' arg.

3 years ago* lisp/mouse.el (context-menu-map): Add 'click' arg to called funs (bug#50256)
Juri Linkov [Sun, 12 Sep 2021 17:11:52 +0000 (20:11 +0300)]
* lisp/mouse.el (context-menu-map): Add 'click' arg to called funs (bug#50256)

(context-menu-toolbar, context-menu-global, context-menu-local)
(context-menu-minor, context-menu-buffers, context-menu-vc)
(context-menu-undo, context-menu-region, context-menu-ffap): Add 'click' arg.

* lisp/dired.el (dired-context-menu):
* lisp/help-mode.el (help-mode-context-menu):
* lisp/info.el (Info-context-menu):
* lisp/net/eww.el (eww-context-menu):
* lisp/net/goto-addr.el (goto-address-context-menu):
* lisp/progmodes/prog-mode.el (prog-context-menu):  Add 'click' arg.

3 years agoFix quoting style in Lisp comments
Eli Zaretskii [Sun, 12 Sep 2021 16:51:06 +0000 (19:51 +0300)]
Fix quoting style in Lisp comments

* lisp/textmodes/rst.el:
* lisp/progmodes/elisp-mode.el (elisp--xref-find-definitions):
* lisp/org/org.el:
* lisp/org/org-list.el (org-list-to-generic):
* lisp/org/org-compat.el:
* lisp/hexl.el (hexl-ascii-region):
* lisp/emacs-lisp/lisp-mode.el:
* lisp/calendar/calendar.el: In comments, quote 'like this'.

3 years ago* lisp/mouse.el (context-menu-map): Remove duplicate separators (bug#50067).
Juri Linkov [Sun, 12 Sep 2021 16:47:20 +0000 (19:47 +0300)]
* lisp/mouse.el (context-menu-map): Remove duplicate separators (bug#50067).

* lisp/mouse.el (context-menu-undo, context-menu-region):
* lisp/progmodes/prog-mode.el (prog-context-menu):
Use 'when' instead of ':visible' that allows to remove duplicate separators
created between empty submenus.

3 years ago; Fix symbol quoting typos
Stefan Kangas [Sun, 12 Sep 2021 16:33:03 +0000 (18:33 +0200)]
; Fix symbol quoting typos

3 years agoUse window-point in event-start and event-end (bug#50256)
Juri Linkov [Sun, 12 Sep 2021 16:31:49 +0000 (19:31 +0300)]
Use window-point in event-start and event-end (bug#50256)

* lisp/subr.el (event-start, event-end): Provide window-point
as an arg for posn-at-point, and for the constructed list.

* lisp/help-mode.el (help-mode-context-menu): Remove a kludge
that checked if window-buffer is current-buffer.

3 years ago* lisp/tab-bar.el: Improve logic of 'ignore-current-tab'.
Juri Linkov [Sun, 12 Sep 2021 16:10:02 +0000 (19:10 +0300)]
* lisp/tab-bar.el: Improve logic of 'ignore-current-tab'.

* lisp/tab-bar.el (tab-bar-get-buffer-tab): Prefer the current tab
when 'ignore-current-tab' is nil.
(display-buffer-in-tab): Use alist entry 'ignore-current-tab'
as the third arg of 'tab-bar-get-buffer-tab'.  Improve docstring.

Suggested by Feng Shu <tumashu@163.com>
https://lists.gnu.org/archive/html/emacs-devel/2021-09/msg00955.html

3 years ago; * lisp/eshell/em-unix.el (nil-blank-string): Doc fix
Hanno Perrey [Sun, 12 Sep 2021 15:22:25 +0000 (17:22 +0200)]
; * lisp/eshell/em-unix.el (nil-blank-string): Doc fix

* lisp/eshell/em-unix.el (nil-blank-string): Fix doc string
(bug#50549).

Copyright-paperwork-exempt: yes

3 years agoMinor copyedits in Emacs FAQ
Eli Zaretskii [Sun, 12 Sep 2021 15:04:02 +0000 (18:04 +0300)]
Minor copyedits in Emacs FAQ

* doc/misc/efaq.texi (What was XEmacs?, Colors on a TTY): Fix
wording and improve the description.

3 years ago; * doc/misc/efaq.texi (What was XEmacs?): Restore pre-merge text.
Stefan Kangas [Sun, 12 Sep 2021 11:14:34 +0000 (13:14 +0200)]
; * doc/misc/efaq.texi (What was XEmacs?): Restore pre-merge text.

3 years agoFix read-no-blanks-input doc string typo
Lars Ingebrigtsen [Sun, 12 Sep 2021 12:11:53 +0000 (14:11 +0200)]
Fix read-no-blanks-input doc string typo

* lisp/minibuffer.el (read-no-blanks-input): Fix doc string typo.

3 years agoFix read-no-blanks-input history argument
dick r. chiang [Sun, 12 Sep 2021 12:11:16 +0000 (14:11 +0200)]
Fix read-no-blanks-input history argument

* lisp/minibuffer.el (read-no-blanks-input): Use the
`minibuffer-history' symbol, not the value (bug#50535).

3 years agoInfer identifier namespace in elisp xref backend
Mattias Engdegård [Tue, 7 Sep 2021 16:21:57 +0000 (18:21 +0200)]
Infer identifier namespace in elisp xref backend

Improve the accuracy of `xref-find-definitions` by inferring the
likely namespace of the sought identifier from its context.
This reduces the number of irrelevant search hits when it is clear
what kind of identifier is being looked for (such as showing a
variable when the user looks for a function).

Co-written with Dmitry Gutov.

* lisp/progmodes/elisp-mode.el (elisp--xref-list-index)
(elisp--xref-infer-namespace, xref-backend-identifier-at-point): New.
(xref-backend-definitions): Use the buffer position for inferring.
(elisp--xref-find-definitions): Use the inferred namespace.
(xref-backend-apropos): Adapt call.
* test/lisp/progmodes/elisp-mode-tests.el (elisp-mode-test--with-buffer)
(elisp-mode-with-buffer, elisp-mode-infer-namespace): New tests.

3 years ago;* lisp/window.el (switch-to-prev-buffer): Fix typo in doc-string.
Martin Rudalics [Sun, 12 Sep 2021 09:38:24 +0000 (11:38 +0200)]
;* lisp/window.el (switch-to-prev-buffer): Fix typo in doc-string.

3 years agoImprove doc-strings of some buffer display options (Bug#50518)
Martin Rudalics [Sun, 12 Sep 2021 09:11:41 +0000 (11:11 +0200)]
Improve doc-strings of some buffer display options (Bug#50518)

* lisp/window.el (pop-up-frame-alist, same-window-buffer-names)
(same-window-regexps, pop-up-frames, pop-up-windows): In
doc-strings say that these options are maintained for backward
compatibility only (Bug#50518).

3 years agoImprove documentation of tab bars in the Emacs manual
Eli Zaretskii [Sun, 12 Sep 2021 08:02:58 +0000 (11:02 +0300)]
Improve documentation of tab bars in the Emacs manual

* doc/emacs/frames.texi (Tab Bars): Improve wording, indexing, and
cross-references.  Make sure each command is mentioned by its name
when it is called out by the key sequence.  Index entries should
precede @item lines in a @table.

3 years agoImprove documentation of some tab-bar features
Eli Zaretskii [Sun, 12 Sep 2021 07:01:38 +0000 (10:01 +0300)]
Improve documentation of some tab-bar features

* lisp/tab-bar.el (tab-bar-show, toggle-frame-tab-bar): Doc
fixes.

* etc/NEWS: Update the corresponding entries.

3 years agoERC: Track: Fix a perceived minor bug in mode line face selection
Olivier Certner [Thu, 14 Jan 2021 17:36:08 +0000 (18:36 +0100)]
ERC: Track: Fix a perceived minor bug in mode line face selection

* lisp/erc/erc-track.el (erc-track-modified-channels): Fix what is a
probable bug when a new insert event happens for a buffer that was not
tracked or for which no mode line face was selected: in this case,
stop treating the latest buffer's face (first in list) as the previous
one, which could be overridden with an older one (in FACES' rest), as
if it had happened after.

3 years agoERC: Track: Rewrite 'erc-track-find-face' as 'erc-track-select-mode-line-face'
Olivier Certner [Thu, 14 Jan 2021 17:26:38 +0000 (18:26 +0100)]
ERC: Track: Rewrite 'erc-track-find-face' as 'erc-track-select-mode-line-face'

* lisp/erc/erc-track.el (erc-track-find-face): Declare obsolete and
rewrite as 'erc-track-select-mode-line-face', changing the function
arguments, so that it is very clear what the current algorithm is.
No functional changes.  Performance improvements.  Clarify the
documentation and remove the part on some faces being lists, which
clearly does not apply.
(erc-track-modified-channels): Replace calls to 'erc-track-find-face'
with calls to 'erc-track-select-mode-line-face', preserving the
existing behavior.
(erc-modified-channels-alist): Change the reference to
'erc-track-select-mode-line-face' in the documentation following the
rename.
* etc/NEWS: Announce the change.

Co-authored-by: Amin Bandali <bandali@gnu.org>
3 years agoMerge from origin/emacs-27
Amin Bandali [Sun, 12 Sep 2021 03:03:57 +0000 (23:03 -0400)]
Merge from origin/emacs-27

d7f4cc0974 ERC: Track: Clarify documentation on tracked buffers and a...
fb1f0dfec9 ERC: Track: Fix documentation of structure of 'erc-modifie...
252a769b11 ; * doc/lispref/files.texi (Changing Files): Fix xref to f...
edc93a5ce6 ; Fix grammar in efaq.texi on Emacs vs XEmacs.

# Conflicts:
# doc/misc/efaq.texi

3 years agoERC: Track: Clarify documentation on tracked buffers and add references
Olivier Certner [Thu, 14 Jan 2021 17:20:26 +0000 (18:20 +0100)]
ERC: Track: Clarify documentation on tracked buffers and add references

* lisp/erc/erc-track.el (erc-modified-channels-alist): Clarify what
the list contains.  Add references to variables and functions involved
in displaying tracked buffers from this list.
(erc-make-mode-line-buffer-name): Describe exactly the algorithm, and
reference custom variables that influence it.

3 years agoERC: Track: Fix documentation of structure of 'erc-modified-channels-alist'
Olivier Certner [Wed, 13 Jan 2021 16:39:54 +0000 (17:39 +0100)]
ERC: Track: Fix documentation of structure of 'erc-modified-channels-alist'

* lisp/erc/erc-track.el (erc-modified-channels-alist): Fix the
docstring: each element is a dotted list where the last cdr is
sometimes a proper list, making the element only sometimes a proper
list.

3 years agoRe-fix bug#16897
Dmitry Gutov [Sun, 12 Sep 2021 00:28:38 +0000 (03:28 +0300)]
Re-fix bug#16897

* lisp/vc/vc-git.el (vc-git--file-list-is-rootdir):
Extract from 'vc-git-command'.
(vc-git--literal-pathspecs): Use it here as well.

3 years agoRefactor bug-reference setup for software forges
Tassilo Horn [Sat, 11 Sep 2021 20:49:29 +0000 (22:49 +0200)]
Refactor bug-reference setup for software forges

* lisp/progmodes/bug-reference.el (bug-reference-gitea-instances)
(bug-reference-gitlab-instances,bug-reference-sourcehut-instances):
Delete defvars.  Those are replaced with bug-reference-forge-alist.
(bug-reference-forge-alist): New variable.
(bug-reference--build-forge-setup-entry): New cl-defgeneric with
methods for github, gitlab, gitea, and sourcehut instances.
(bug-reference--setup-from-vc-alist): Use bug-reference-forge-alist
and bug-reference--build-forge-setup-entry.
* doc/emacs/maintaining.texi (Bug Reference): Mention that the first
group in bug-reference-bug-regexp defines the overlay bounds.  Also
mention bug-reference-forge-alist in VCS setup section.

3 years agoFix byte-compilation warnings
Mattias Engdegård [Sat, 11 Sep 2021 15:13:14 +0000 (17:13 +0200)]
Fix byte-compilation warnings

* lisp/calc/calc-graph.el (calc-gnuplot-check-for-errors):
* lisp/calendar/holidays.el (list-holidays):
Dodge 'save-excursion+set-buffer' warnings that appeared after
the progn flattening was introduced.

3 years agoRemove obsolete variable
Mattias Engdegård [Sat, 11 Sep 2021 12:46:45 +0000 (14:46 +0200)]
Remove obsolete variable

* lisp/emacs-lisp/byte-opt.el
(byte-optimize--vars-outside-condition): Remove.
(byte-optimize-form-code-walker): Remove bindings.

3 years agoPropagate aliased lexical variables in byte compiler
Mattias Engdegård [Fri, 30 Jul 2021 11:44:07 +0000 (13:44 +0200)]
Propagate aliased lexical variables in byte compiler

Replace uses of a variable aliasing another variable with that aliased
variable, to allow for variable removal when possible.  This also
enables opportunities for other optimisations.  Example:

 (let ((y x)) (f y)) => (f x)

The optimisation is only performed if both aliased and aliasing
variables are lexically bound.  Shadowing bindings are α-renamed when
necessary for correctness.  Example:

   (let* ((b a) (a EXPR)) (f a b))
=> (let* ((a{new} EXPR)) (f a{new} a))

* lisp/emacs-lisp/byte-opt.el (byte-optimize--aliased-vars): New.
(byte-optimize-form-code-walker): Cancel aliasing upon mutation.
(byte-optimize--rename-var-body, byte-optimize--rename-var): New.
(byte-optimize-let-form): Add the optimisation.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases):
Add relevant test cases.

3 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Sat, 11 Sep 2021 14:50:42 +0000 (17:50 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

3 years ago; * src/w32term.c (w32_read_socket): Avoid compiler warning.
Eli Zaretskii [Sat, 11 Sep 2021 14:50:08 +0000 (17:50 +0300)]
; * src/w32term.c (w32_read_socket): Avoid compiler warning.

3 years agoKeep python.el compatible with older Emacsen
Augusto Stoffel [Sat, 11 Sep 2021 13:39:13 +0000 (15:39 +0200)]
Keep python.el compatible with older Emacsen

* progmodes/python.el (python-shell-send-string): Don't assume
comint-max-line-length is defined (bug#50503).

3 years agoTramp code cleanup
Michael Albinus [Sat, 11 Sep 2021 13:35:51 +0000 (15:35 +0200)]
Tramp code cleanup

* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-make-directory): Simplify.

* lisp/net/tramp-sh.el (tramp-methods) <telnet, nc>: Don't use
"%n" marker.

* test/lisp/net/tramp-tests.el (tramp-test13-make-directory): Merge with
`tramp-test-make-directory-helper' and
`tramp-test13-make-directory-with-file-modes'.
(tramp-test44-asynchronous-requests): Use always the same
operation in timer.

3 years agoAllow using 'python-shell-send-file' across machines
Augusto Stoffel [Sat, 11 Sep 2021 13:02:04 +0000 (15:02 +0200)]
Allow using 'python-shell-send-file' across machines

* progmodes/python.el (python-shell-eval-file-setup-code): Look for a
file coding cookie on the Python rather than on the Emacs side, to
avoid additional file transfers.
(python-shell--save-temp-file): Allow argument to be a buffer.
(python-shell-send-file): Address the case where the selected file and
the inferior process are on different machines (bug#50516).

3 years ago; * src/keyboard.c (make_lispy_position): Fix a recent change.
Eli Zaretskii [Sat, 11 Sep 2021 12:59:32 +0000 (15:59 +0300)]
; * src/keyboard.c (make_lispy_position): Fix a recent change.

3 years agoImplement caching for 'python-shell-completion-at-point'
Augusto Stoffel [Sat, 11 Sep 2021 12:50:28 +0000 (14:50 +0200)]
Implement caching for 'python-shell-completion-at-point'

* lisp/progmodes/python.el (python-shell-completion-at-point): cache
results, since computing them involves talking with the inferior
process and, potentially, network communications
(python-shell--capf-cache): new variable, for cache
(python-shell-completion-get-completions)
(python-shell-completion-native-get-completions): 'import' argument is
not needed anymore.
(python-shell-completion-native-setup)
(python-shell-completion-native-try): pass the setup code
synchronously, to avoid printing a message in the shell (bug#50459).

3 years agoFix display of tab-bar buttons
Alan Third [Wed, 8 Sep 2021 16:57:50 +0000 (17:57 +0100)]
Fix display of tab-bar buttons

* src/xterm.c (x_draw_image_relief):
* src/w32term.c (w32_draw_image_relief): Fix the display of
tab-bar buttons when mouse pointer moves off the button.
(Bug#50424)

3 years agoDocument tool-bar and tab-bar mouse events
Eli Zaretskii [Sat, 11 Sep 2021 11:40:51 +0000 (14:40 +0300)]
Document tool-bar and tab-bar mouse events

* doc/lispref/commands.texi (Click Events): Document the format of
POSITION for tab-bar and tool-bar events.

3 years agoFix tab-bar scrolling for mice that report mouse-wheel events
Eli Zaretskii [Sat, 11 Sep 2021 10:58:10 +0000 (13:58 +0300)]
Fix tab-bar scrolling for mice that report mouse-wheel events

* src/keyboard.c (make_lispy_position): Call
'window_from_coordinates' with last 2 arguments non-zero, to have
it report on tool-bar and tab-bar positions.  Tweak the return
value according to the expectations of 'make_lispy_event'.
(make_lispy_event): No more need to inject "tab-bar" into a click
event on the tab bar: it's already there.

3 years ago; Add some TODOs for the bug-reference-<forge>-instances variables
Tassilo Horn [Sat, 11 Sep 2021 09:59:06 +0000 (11:59 +0200)]
; Add some TODOs for the bug-reference-<forge>-instances variables

3 years agobug-reference-bug-regexp now defines a contract for the overlay region
Tassilo Horn [Thu, 9 Sep 2021 20:31:47 +0000 (22:31 +0200)]
bug-reference-bug-regexp now defines a contract for the overlay region

Formerly, bug-reference-fontify placed the overlay on the complete
match of bug-reference-bug-regexp.  That made it impossible to encode
constraints like "must not match at BOL" in the regexp without messing
up fontification.  Therefore, now it establishes the contract that
subexpression 1 defines the overlay region.  Subexpression 2 must
still match the part of the bug reference injected into
bug-reference-url-format if that's a string.  If its a function, the
interpretation of subexpressions > 1 is up to the function.

For backwards compatibility, bug-reference-fontify checks if the
bounds of subexpression 2..10 are within the bounds of subexpession
1.  If not, or subexpression 1 doesn't even exist/match, we fall back
to placing the overlay from (match-beginning 0) to (match-end 0) but
issue a warning.

* lisp/progmodes/bug-reference.el (bug-reference-bug-regexp): Document
contract that subexpression 1 defines the overlay region and adapt the
default value accordingly.
(bug-reference--nonconforming-regexps): New internal variable.
(bug-reference--overlay-bounds): New function.
(bug-reference-fontify): Place overlay on subexpression 1's bounds if
bug-reference-bug-regexp conforms to the documented contract.
(bug-reference--setup-from-vc-alist): Adapt regexps to new contract.
* doc/emacs/maintaining.texi (Bug Reference): Adapt regexp used in
example.

3 years ago; * lisp/emacs-lisp/comp.el (native-comp-compiler-options): Doc fix.
Eli Zaretskii [Sat, 11 Sep 2021 07:22:06 +0000 (10:22 +0300)]
; * lisp/emacs-lisp/comp.el (native-comp-compiler-options): Doc fix.

3 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Sat, 11 Sep 2021 07:18:21 +0000 (10:18 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

3 years ago* lisp/info.el (Info-streamline-headings): Add entry.
Stefan Kangas [Sat, 11 Sep 2021 07:15:46 +0000 (09:15 +0200)]
* lisp/info.el (Info-streamline-headings): Add entry.

3 years agoImprove documentation of Show Paren mode
Eli Zaretskii [Sat, 11 Sep 2021 07:16:59 +0000 (10:16 +0300)]
Improve documentation of Show Paren mode

* doc/emacs/programs.texi (Matching): Improve wording and
indexing.  (Bug#29381)

3 years agoFix restoring from pdumper file on MS-Windows 9X
Eli Zaretskii [Sat, 11 Sep 2021 06:56:27 +0000 (09:56 +0300)]
Fix restoring from pdumper file on MS-Windows 9X

* src/pdumper.c (dump_map_file_w32): Use PAGE_WRITECOPY flag when
calling CreateFileMapping for DUMP_MEMORY_ACCESS_READWRITE access,
as that is required by Windows 9X.  (Bug#50453)

3 years ago; * doc/lispref/files.texi (Changing Files): Fix xref to file-modes.
Stephen Gildea [Sat, 11 Sep 2021 03:21:34 +0000 (20:21 -0700)]
; * doc/lispref/files.texi (Changing Files): Fix xref to file-modes.

'file-modes' is in node "Testing Accessibility", not "File Attributes".

3 years agoNew minor mode 'show-paren-local-mode'
Dmitry Gutov [Sat, 11 Sep 2021 02:11:53 +0000 (05:11 +0300)]
New minor mode 'show-paren-local-mode'

* lisp/paren.el (show-paren--delete-overlays):
New function, extracted from show-paren-mode.
(show-paren-local-mode): New minor mode.
(show-paren-mode): Update docstring to mention it (bug#29381).

* doc/emacs/programs.texi (Matching): Update show-paren-mode section.

3 years agoImprove overlay placement performance
Tassilo Horn [Fri, 10 Sep 2021 22:04:46 +0000 (00:04 +0200)]
Improve overlay placement performance

* lisp/progmodes/bug-reference.el (bug-reference--overlays-in): New
function.
(bug-reference-unfontify): Use it.
(bug-reference-fontify): Reuse and move existing overlays instead of
deleting all and creating them anew.

3 years agoAdd support for GCC compiler command-line options
Arthur Miller [Fri, 10 Sep 2021 18:57:19 +0000 (20:57 +0200)]
Add support for GCC compiler command-line options

* lisp/emacs-lisp/comp.el ('native-comp-compiler-options): New option.
* lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Add support
for new 'native-comp-compiler-options'.
* src/comp.c (Fcomp_native_compiler_options_effective_p): New function.
(add_compiler_options): New function.
(Fcomp__compile_ctxt_to_file): Call 'add_compiler_options'.

3 years agoFix test find-defs-defgeneric-el
Dmitry Gutov [Fri, 10 Sep 2021 15:42:55 +0000 (18:42 +0300)]
Fix test find-defs-defgeneric-el

* test/lisp/progmodes/elisp-mode-tests.el (find-defs-defgeneric-el):
Fix the test.  Reported by dick.r.chiang@gmail.com.

3 years agoRevert usage of format-prompt in python.el
Lars Ingebrigtsen [Fri, 10 Sep 2021 11:06:09 +0000 (13:06 +0200)]
Revert usage of format-prompt in python.el

* lisp/progmodes/python.el (python-eldoc-at-point): Revert usage
of format-prompt in python.el since this is also an ELPA package
(and older Emacs versions doesn't have format-prompt).

3 years agoProperly encode all strings sent to Python shell
Augusto Stoffel [Fri, 10 Sep 2021 11:04:54 +0000 (13:04 +0200)]
Properly encode all strings sent to Python shell

* lisp/progmodes/python.el: Now depends on Emacs 28.
(python-shell-package-enable, python-shell-completion-get-completions)
(python-ffap-module-path, python-eldoc--get-doc-at-point): Enconde
Python strings using 'python-shell--encode-string' instead of triple
quotes.
(python-shell-completion-string-code, python-eldoc-string-code)
(python-ffap-string-code): Remove defcustoms. (bug#50503).

3 years agoTramp: honor default file modes in make-directory
Stephen Gildea [Fri, 10 Sep 2021 13:30:06 +0000 (06:30 -0700)]
Tramp: honor default file modes in make-directory

* lisp/net/tramp-sh.el:
* lisp/net/tramp-adb.el:
* lisp/net/tramp-sudoedit.el:
* lisp/net/tramp-gvfs.el: Add support for default file modes to
relevant Tramp back ends for make-directory.  (Closes: Bug#50410)
* test/lisp/net/tramp-tests.el (tramp-test13-make-directory-with-file-modes):
New test.
* etc/NEWS: Note this enhancement.

Thanks to Michael Albinus for helping improve this patch.