Commit graph

81412 commits

Author SHA1 Message Date
Lars Ingebrigtsen
b2e3669d96 Tweak python-hideshow-forward-sexp-function warning avoidance
* lisp/progmodes/python.el
(python-hideshow-forward-sexp-function): Avoid compilation warning
in a more standard way.  Problem reported in
https://thedailywtf.com/articles/the-programmer-s-motto-and-other-comments
2021-09-15 15:53:53 +02:00
Michael Albinus
37020ca341 * lisp/net/tramp-sh.el (tramp-methods): <sudo>: Change template. (Bug#50594) 2021-09-15 15:14:24 +02:00
Mattias Engdegård
544db1ee86 Faster grep pattern for identifiers
* lisp/cedet/semantic/symref/grep.el (semantic-symref-perform-search):
Use the `-w` flag instead of wrapping the pattern in regexps that make
matching much slower.  This speeds up `xref-find-references` by about
3× on macOS.
2021-09-15 13:54:24 +02:00
Eli Zaretskii
83557511a7 Update Unicode support to Unicode version 14.0.0
* admin/unidata/copyright.html:
* admin/unidata/UnicodeData.txt:
* admin/unidata/Blocks.txt:
* admin/unidata/BidiBrackets.txt:
* admin/unidata/BidiMirroring.txt:
* admin/unidata/IVD_Sequences.txt:
* admin/unidata/NormalizationTest.txt:
* admin/unidata/SpecialCasing.txt:
* test/manual/BidiCharacterTest.txt: Updated files from Unicode
14.0.

* lisp/international/fontset.el (script-representative-chars): Add
new scripts.
(otf-script-alist): Update from latest version.
(setup-default-fontset): Add new scripts.
* lisp/international/characters.el: Update syntax and category
tables for new characters and scripts.
(char-width-table): Update for changes in Unicode 14.0.
* lisp/international/mule-cmds.el (ucs-names): Update used and
unused ranges per Unicode 14.0.

* test/lisp/international/ucs-normalize-tests.el
(ucs-normalize-tests--failing-lines-part1)
(ucs-normalize-tests--failing-lines-part2): Update per the test
results.

* doc/lispref/nonascii.texi (Character Properties): Update Unicode
version number.

* etc/NEWS: Announce support for Unicode 14.0.

* admin/notes/unicode: Minor copyedits.
2021-09-15 14:40:13 +03:00
Augusto Stoffel
6cfc312d71 Python shell: rearrange printing of newline before output
* progmodes/python.el (python-shell-output-filter-in-progress)
(python-shell-output-filter-buffer): Move defvars to avoid compiler
warnings.
(python-shell-eval-setup-code): Don't print a newline in
__PYTHON_EL_eval.
(python-shell-send-string): Insert newline before output when
applicable (bug#50514).
2021-09-15 10:02:34 +02:00
Lars Ingebrigtsen
3c2753a3b8 Make bookmark fringe marks evaporate
* lisp/bookmark.el (bookmark--set-fringe-mark): Make the bookmark
evaporate when a buffer is erased (like, for instance, when doing
`revert-buffer' in a vc buffer).
2021-09-15 09:58:45 +02:00
Lars Ingebrigtsen
fbef1ee018 Mention lisp-data-mode' in emacs-lisp-mode' doc string
* lisp/progmodes/elisp-mode.el (emacs-lisp-mode): Mention
`lisp-data-mode'.
2021-09-15 09:58:45 +02:00
Juri Linkov
ba28acf3b8 Adjust occur-context-menu and elisp-context-menu
* lisp/progmodes/elisp-mode.el (elisp-context-menu): Add separator
only when there is a symbol at mouse click.

* lisp/replace.el (occur-context-menu): Insert items in the middle
of the menu after mark-whole-buffer.
2021-09-15 10:20:42 +03:00
Philip Kaludercic
3eb80b7847 Add occur-related context-menu operations (bug#50552)
* replace.el (occur-word-at-mouse): Add new command.
(occur-symbol-at-mouse): Add new command.
(occur-context-menu): Add new function.
2021-09-15 10:13:53 +03:00
Juri Linkov
67ab890cde * lisp/window.el (display-buffer-in-previous-window): Add symbolp (bug#50576) 2021-09-15 09:47:58 +03:00
Juri Linkov
b172049717 * lisp/tab-bar.el (tab-bar-close-other-tabs): Add arg ‘tab-number’.
(tab-bar-mouse-context-menu): Bind menu-item "Close other tabs" to
tab-bar-close-other-tabs with arg ‘tab-number’.
2021-09-15 09:30:11 +03:00
Juri Linkov
cc52f6d995 * lisp/tab-bar.el: Rename args to consistent naming convention.
Use the same naming scheme for function arguments.  Use the term "index" when
arguments count from 0, and the term "number" when arguments count from 1.

* lisp/tab-bar.el (tab-bar-select-tab): Rename ‘arg’ to ‘tab-number’.
(tab-bar-move-tab-to): Rename ‘from-index’ to ‘from-number’
and ‘to-index’ to ‘to-number’.
(tab-bar-move-tab-to-frame): Rename ‘from-index’ to ‘from-number’
and ‘to-index’ to ‘to-number’.
(tab-bar-new-tab-to): Rename ‘to-index’ to ‘tab-number’.
(tab-bar-close-tab): Rename ‘arg’ to ‘tab-number’
and ‘to-index’ to ‘to-number’.
(tab-bar-rename-tab): Rename ‘arg’ to ‘tab-number’.
(tab-bar-change-tab-group): Rename ‘arg’ to ‘tab-number’.
2021-09-15 09:27:57 +03:00
Stephen Gildea
b189b6f256 * lisp/mh-e/mh-e.el: Simplify file commentary for a native package. 2021-09-14 20:27:09 -07:00
Dmitry Gutov
c83f5e77db ; Add a note 2021-09-15 05:51:24 +03:00
Dmitry Gutov
1f54c7aeed Localize namespace-filtering code
To be able to filter results coming from
elisp-xref-find-def-functions, and for general ease of
understanding.

* lisp/progmodes/elisp-mode.el (elisp--xref-find-definitions):
Undo the previous change.
(xref-backend-apropos): Update accordingly.
(elisp--xref-filter-definitions): New function.
(xref-backend-definitions): Use it to post-filter the results
coming from elisp--xref-find-definitions.

* test/lisp/progmodes/elisp-mode-tests.el (find-defs-minor-defvar-c):
New test.
(find-defs-defun-defvar-el): Update test.
2021-09-15 05:33:06 +03:00
Wilson Snyder
e4fdf87e71 verilog-mode.el: Update verilog-mode from upstream.
* lisp/progmodes/verilog-mode.el: (verilog-basic-complete-re)
(verilog-behavioral-block-beg-re, verilog-defun-keywords)
(verilog-defun-level-generate-only-re, verilog-defun-level-re)
(verilog-endcomment-reason-re, verilog-indent-re) (verilog-keywords,
verilog-no-indent-begin-re) (verilog-set-auto-endcomments): Support
Verilog-A `analog` blocks (#1738).  Reported by Dan McMahill.
(verilog-read-defines): Fix verilog-read-defines to work
with SystemVerilog types (#1734).  Reported by Shareef Jalloq.
(verilog-indent-declaration,
verilog-pretty-declarations): Fix leaving extra spaces before tabs on
lining up declarations. (#1723) Reported by TAKAI Kousuke.
(verilog-auto-inst, verilog-auto-inst-port)
(verilog-read-auto-template-middle, verilog-read-sub-decls-line):
Support AUTONOHOOKUP to not AUTOWIRE hookup AUTO_TEMPLATE signals. (#1526)
Reported by firefoxtc.
2021-09-14 21:21:33 -04:00
João Távora
55dda2571a Unbreak make bootstrap (don't use cl-defun's &aux parameters)
* lisp/progmodes/flymake.el (flymake--handle-report): Don't use &aux.
2021-09-14 19:30:47 +01:00
Harald Jörg
3d49ad73e5 cperl-mode.el: Allow non-ASCII Perl identifiers
Replace all "A-Z" regexp literals with unicode-aware rx constructs
wherever Perl allows non-ASCII identifiers.
* lisp/progmodes/cperl-mode.el (cperl-after-sub-regexp)
(cperl-after-label. cperl-sniff-for-indent)
(cperl-find-pods-heres, cperl-indent-exp)
(cperl-fix-line-spacing, cperl-imenu--create-perl-index)
(cperl-init-faces, cperl-find-tags):
Replace ASCII regex literals by unicode-aware rx constructs.
(cperl-init-faces): Eliminate unused lexical `font-lock-anchored'.
(cperl-have-help-regexp, cperl-word-at-point-hard): Allow non-ASCII
word characters.

* test/lisp/progmodes/cperl-mode-tests.el
(cperl-test-fontify-special-variables): New test for $^T
and $^{VARNAME}.
(cperl-test-ws-rx cperl-test-ws+-rx),
(cperl-test-version-regexp, cperl-test-package-regexp): Skip
for perl-mode.
(cperl-test-identifier-rx, cperl--test-unicode-setup)
(cperl-test-unicode-labels, cperl-test-unicode-sub)
(cperl-test-unicode-varname)
(cperl-test-unicode-varname-list, cperl-test-unicode-arrays)
(cperl-test-unicode-hashes, cperl-test-unicode-hashref)
(cperl-test-unicode-proto, cperl-test-unicode-fhs)
(cperl-test-unicode-hashkeys, cperl-test-word-at-point):
New tests for unicode identifiers.
 (cperl-test-imenu-index): Add a unicode identifier to the test.

* test/lisp/progmodes/cperl-mode-resources/grammar.pl: Add a
function with non-ASCII name for imenu tests.
2021-09-14 17:53:52 +02:00
Glenn Morris
89068554d7 * lisp/emacs-lisp/checkdoc.el (checkdoc-symbol-words): Fix type. 2021-09-14 08:05:29 -07:00
Lars Ingebrigtsen
159dbd5eb2 Make `find-function-source-path' into obsolete alias
* lisp/finder.el (finder-commentary): Adjust usage.

* lisp/emacs-lisp/find-func.el (find-function-source-path): Made
into obsolete alias (bug#50508).
(find-library-source-path): New name.
(find-library-name, find-library, find-function-noselect)
(find-variable-noselect, find-definition-noselect): Adjust usage
and update doc strings.
2021-09-14 13:44:20 +02:00
João Távora
4633e02726 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.
2021-09-14 12:26:25 +01:00
João Távora
79eb840753 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
2021-09-14 12:22:15 +01:00
João Távora
aec08e609e 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..
2021-09-14 12:22:15 +01:00
João Távora
7d9d3951c6 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.
2021-09-14 12:22:15 +01:00
João Távora
e793a73fbe 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.
2021-09-14 12:22:15 +01:00
João Távora
4040232994 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.
2021-09-14 12:22:14 +01:00
João Távora
6e10086901 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.
2021-09-14 12:22:14 +01:00
Juri Linkov
3f835ad580 * lisp/tab-bar.el: Close tab only on mouse-1, not down-mouse-1 (bug#41343)
* lisp/tab-bar.el (tab-bar-mouse-select-tab): Don't close the tab
when clicked on the close button.
(tab-bar-mouse-close-tab-from-button): New function.
(tab-bar-map): Bind [mouse-1] to 'tab-bar-mouse-close-tab-from-button'.
(tab-bar-mouse-move-tab): Do nothing on non-tab events.
2021-09-14 09:42:11 +03:00
Stefan Kangas
5cd5cc5dd8 ; * lisp/emacs-lisp/checkdoc.el: Fix typo in previous commit. 2021-09-14 08:15:15 +02:00
Stefan Kangas
25ebb9374b ; More minor docfixes found by checkdoc 2021-09-14 07:57:14 +02:00
Stefan Kangas
cf2fa6c87f Add user option to avoid checkdoc warning for unescaped left paren
* lisp/emacs-lisp/checkdoc.el
(checkdoc-column-zero-backslash-before-paren): New user option to
avoid warning on unescaped left parenthesis in column zero.
(checkdoc-this-string-valid-engine): Respect above new option.
2021-09-14 07:56:06 +02:00
Stefan Kangas
269c8a0b63 Minor improvements to checkdoc
* lisp/emacs-lisp/checkdoc.el (checkdoc-symbol-words): Add ignored
values.
(checkdoc-proper-noun-list): Remove XEmacs from list of words to
capitalize; there is little need to insist on consistency here.
(checkdoc-in-abbreviation-p): Add abbreviation "etc." and sort entries
alphabetically.
2021-09-14 07:56:06 +02:00
Dmitry Gutov
5a34b65a3b Use the term "future history" rather than "default"
* lisp/progmodes/project.el
(project-find-file, project-or-external-find-file):
Update docstring.
(project--read-file-cpd-relative, project--read-file-absolute)
(project--completing-read-strict): Rename DEFAULT to MB-DEFAULT.
(project-find-file-in): Rename FILENAME to SUGGESTED-FILENAME.
2021-09-14 00:56:20 +03:00
Dmitry Gutov
9000aeaed4 Make sure to return some valid project root
* lisp/progmodes/project.el (project-prompt-project-dir):
If the user just pressed RET on prompt, prompt again.
2021-09-14 00:53:05 +03:00
Juri Linkov
8c80430824 * lisp/progmodes/elisp-mode.el (elisp-context-menu): New function (bug#9054)
(emacs-lisp-mode): Add elisp-context-menu to context-menu-functions.
2021-09-13 21:41:24 +03:00
Juri Linkov
a17bea6d63 * lisp/isearch.el: Improve 'isearch-allow-motion' feature (bug#50466)
* lisp/isearch.el: Add recenter to 'isearch-motion' property of
'end-of-buffer' to maximize the number of search hits on the screen.
In 'isearch-motion' property of 'scroll-up-command' use 'recenter 0'
for the first line of the screen.
(isearch-beginning-of-buffer)
(isearch-end-of-buffer): Sync logic from 'isearch-allow-motion' part
of isearch-pre-command-hook.  Direct users to isearch-allow-motion
in the docstrings.
(isearch-pre-command-hook): Don't override shifted 'isearch-yank-on-move'
in 'isearch-allow-motion'.
2021-09-13 21:18:30 +03:00
Mattias Engdegård
4cf6d03d04 Remove duplication of find file pattern arguments
* lisp/cedet/semantic/symref/grep.el
(semantic-symref-derive-find-filepatterns): Avoid including the same
pattern twice.
2021-09-13 18:41:58 +02:00
Lars Ingebrigtsen
5ee05fa75d Fix typo in previous files.el change 2021-09-13 15:32:20 +02:00
Lars Ingebrigtsen
59ff342869 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).
2021-09-13 15:17:06 +02:00
Lars Ingebrigtsen
7fe88446c3 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.
2021-09-13 13:35:53 +02:00
Lars Ingebrigtsen
adda0df193 completions-annotations doc string clarification
* lisp/minibuffer.el (completions-annotations): Mention that it's
not always used.
2021-09-13 12:20:57 +02:00
Lars Ingebrigtsen
08540a29e3 package-menu-execute doc string clarification
* lisp/emacs-lisp/package.el (package-menu-execute): Say what
happens to upgrade-marked packages (bug#50551).
2021-09-13 10:35:22 +02:00
Juri Linkov
fd1379a85a 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.
2021-09-13 11:15:10 +03:00
Lars Ingebrigtsen
4ee8b4d225 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.
2021-09-13 10:03:28 +02:00
Lars Ingebrigtsen
173c2ea8a3 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).
2021-09-13 09:39:45 +02:00
Lars Ingebrigtsen
c1a1339526 Add some search-whitespace-regexp examples
* lisp/isearch.el (search-whitespace-regexp): Add some
alternatives in the defcustom.
2021-09-13 09:24:46 +02:00
Lars Ingebrigtsen
d15c430a84 Mention get-byte in shortdoc
* lisp/emacs-lisp/shortdoc.el (buffer): Mention `get-byte' here.
2021-09-13 09:20:21 +02:00
Tassilo Horn
8454566b76 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.
2021-09-13 07:22:50 +02:00
Tassilo Horn
7fe756c014 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.
2021-09-13 07:11:05 +02:00
Stefan Kangas
fc6ed9a721 Declare unused function cperl-inside-parens-p obsolete
* lisp/progmodes/cperl-mode.el (cperl-inside-parens-p): Declare
unused function obsolete.
2021-09-13 06:44:52 +02:00