Lars Ingebrigtsen
ae877d5511
Add new user option flymake-mode-line-lighter
...
* doc/misc/flymake.texi (Customizable variables): Document it.
* lisp/progmodes/flymake.el (flymake-mode-line-lighter): New user
option (bug#55115).
(flymake--mode-line-title): Use it.
2022-04-26 12:39:13 +02:00
Dmitry Gutov
39646c822b
Fix Ruby indentation with double splat as first block param
...
* lisp/progmodes/ruby-mode.el (ruby-smie--forward-token)
(ruby-smie--backward-token): Tokenize "**" separately from "|".
Problem reported at https://github.com/dgutov/robe/issues/136 .
2022-04-26 05:36:35 +03:00
Lars Ingebrigtsen
dad2a41a2a
Make flymake-show-buffer-diagnostics error out in non-Flymake buffers
...
* lisp/progmodes/flymake.el (flymake-show-buffer-diagnostics):
Signal an error if run outside of a buffer with Flymake enabled
(bug#55097).
2022-04-25 10:05:44 +02:00
Lars Ingebrigtsen
e632c7bd80
Ensure that the global sql-buffer variable is set
...
* lisp/progmodes/sql.el (sql-product-interactive): Set the
expected global value of sql-buffer (bug#55088).
2022-04-24 13:39:36 +02:00
Alan Mackenzie
9c346270f9
CC Mode: New alignment function c-lineup-argcont-+
...
This fixes bug #21409 .
* lisp/progmodes/cc-align.el (c-lineup-argcont-1): New function, mainly
extracted from c-lineup-argcont.
(c-lineup-argcont): Refactored to use the new function above.
(c-lineup-argcont-+): New function.
* doc/misc/cc-mode.texi (Operator Line-Up): Add a new piece for
c-lineup-argcont-+.
2022-04-23 20:02:49 +00:00
Lars Ingebrigtsen
5bc5e56576
Make elisp-flymake-byte-compile clean up on failures
...
* lisp/progmodes/elisp-mode.el (elisp-flymake-byte-compile): Clean
up no matter what the exit status of the process is (bug#55056).
2022-04-23 14:52:45 +02:00
Filipp Gunbin
ca5fb2b922
Fix prompts in sql-get-login again
...
* lisp/progmodes/sql.el (sql-get-login-ext): Use prompt-def
everywhere.
(sql-get-login): Revert previous fix (bug#52546).
2022-04-23 14:29:45 +02:00
Lars Ingebrigtsen
bbf389ea6d
Audit quoting the quote character in doc strings
...
* test/src/regex-emacs-tests.el (regex-tests-compare):
(regex-tests-compare):
(regex-tests-match):
* test/lisp/xml-tests.el (xml-parse-tests--qnames):
* test/lisp/mh-e/mh-thread-tests.el (mh-thread-tests-before-from):
* test/lisp/cedet/srecode-utest-template.el (srecode-utest-map-reset):
* test/lisp/calc/calc-tests.el (calc-tests-equal):
* lisp/window.el (get-lru-window):
(get-mru-window):
(get-largest-window):
(quit-restore-window):
(display-buffer):
* lisp/vc/vc-rcs.el (vc-rcs-consult-headers):
* lisp/url/url-auth.el (url-digest-auth-build-response):
* lisp/tutorial.el (tutorial--find-changed-keys):
* lisp/transient.el (transient-suffix-object):
* lisp/textmodes/rst.el (rst-insert-list-new-item):
* lisp/textmodes/bibtex.el (bibtex-clean-entry):
* lisp/tab-bar.el (tab-bar--key-to-number):
(toggle-frame-tab-bar):
* lisp/ses.el (ses-recalculate-cell):
(ses-define-local-printer):
(ses-prin1):
* lisp/progmodes/xref.el (xref--find-ignores-arguments):
* lisp/progmodes/verilog-mode.el (verilog-single-declaration-end):
* lisp/progmodes/tcl.el (tcl-mode-hook):
* lisp/progmodes/gdb-mi.el (gdb-get-buffer-create):
* lisp/progmodes/elisp-mode.el (elisp--xref-make-xref):
* lisp/play/dunnet.el (dun-room-objects):
* lisp/outline.el (outline--cycle-state):
* lisp/org/ox-publish.el (org-publish-find-property):
* lisp/org/ox-html.el (org-html--unlabel-latex-environment):
* lisp/org/org-table.el (org-table-collapse-header):
* lisp/org/org-plot.el (org--plot/prime-factors):
* lisp/org/org-agenda.el (org-agenda--mark-blocked-entry):
(org-agenda-set-restriction-lock):
* lisp/org/ob-lua.el (org-babel-lua-read-string):
* lisp/org/ob-julia.el (org-babel-julia-evaluate-external-process):
(org-babel-julia-evaluate-session):
* lisp/org/ob-core.el (org-babel-default-header-args):
* lisp/obsolete/mouse-sel.el (mouse-select):
(mouse-select-secondary):
* lisp/net/tramp.el (tramp-methods):
* lisp/net/eww.el (eww-accept-content-types):
* lisp/net/dictionary-connection.el (dictionary-connection-status):
* lisp/minibuffer.el (completion-flex--make-flex-pattern):
* lisp/mh-e/mh-mime.el (mh-have-file-command):
* lisp/mh-e/mh-limit.el (mh-subject-to-sequence):
(mh-subject-to-sequence-threaded):
(mh-subject-to-sequence-unthreaded):
* lisp/mail/feedmail.el (feedmail-queue-buffer-file-name):
(feedmail-vm-mail-mode):
* lisp/ls-lisp.el (ls-lisp--sanitize-switches):
* lisp/keymap.el (key-valid-p):
* lisp/international/ccl.el (ccl-compile-branch-blocks):
* lisp/image/image-converter.el (image-convert):
* lisp/gnus/spam.el (spam-backend-check):
* lisp/gnus/nnselect.el (nnselect-generate-artlist):
* lisp/gnus/nnmairix.el (nnmairix-widget-other):
* lisp/gnus/message.el (message-mailto):
* lisp/gnus/gnus-sum.el (gnus-collect-urls-from-article):
* lisp/gnus/gnus-search.el (gnus-search-prepare-query):
* lisp/frame.el (frame-size-history):
* lisp/eshell/esh-var.el (eshell-parse-variable-ref):
* lisp/eshell/em-dirs.el (eshell-expand-multiple-dots):
* lisp/erc/erc-backend.el (erc-bounds-of-word-at-point):
* lisp/emulation/cua-rect.el (cua--rectangle-operation):
* lisp/emacs-lisp/text-property-search.el (text-property-search-forward):
* lisp/emacs-lisp/package.el (package-desc-suffix):
* lisp/emacs-lisp/faceup.el (faceup-test-explain):
* lisp/emacs-lisp/comp.el (comp-curr-allocation-class):
(comp-alloc-class-to-container):
(comp-add-cstrs):
(comp-remove-type-hints-func):
(batch-byte+native-compile):
* lisp/emacs-lisp/cl-macs.el (cl--optimize):
* lisp/elec-pair.el (electric-pair--syntax-ppss):
* lisp/doc-view.el (doc-view-doc-type):
* lisp/cedet/semantic/symref.el (semantic-symref-tool-alist):
(semantic-symref-hit-to-tag-via-db):
(semantic-symref-hit-to-tag-via-buffer):
* lisp/cedet/semantic/lex-spp.el (semantic-lex-spp-get-overlay):
* lisp/cedet/semantic/java.el (semantic-java-doc-keywords-map):
* lisp/cedet/semantic/find.el (semantic-brute-find-tag-by-function):
* lisp/cedet/semantic/db.el (semanticdb-project-predicate-functions):
* lisp/cedet/semantic.el (semantic-working-type):
* lisp/cedet/ede/files.el (ede-flush-directory-hash):
* lisp/calc/calc.el (calc--header-line):
* lisp/auth-source.el (auth-source-pick-first-password):
(auth-source--decode-octal-string):
* etc/themes/modus-themes.el (modus-themes--paren):
(modus-themes--agenda-habit):
* admin/cus-test.el (cus-test-vars-with-changed-state): Fix
quoting in doc strings. In code examples, the ' character is
quoted with \\=, and regularize 'foo to `foo', and quote strings
like "foo" instead of 'foo'.
2022-04-22 16:17:22 +02:00
Sean Whitton
ad89ec84ee
Bind 'imenu' to 'M-g i' globally
...
Another candidate was 'M-s i'. Discussion on emacs-devel has led me
to conclude that most people will find 'M-g i' more intuitive and thus
easier to memorize.
* lisp/bindings.el (goto-map): Bind 'imenu' to 'M-g i' globally.
* etc/NEWS: Document the change.
* doc/emacs/programs.texi (Imenu):
* lisp/progmodes/cperl-mode.el: Replace 'M-x imenu' with 'M-g i'.
2022-04-21 11:57:01 -07:00
Eli Zaretskii
25308a95f8
Improve documentation of 'scheme-indent-function' property
...
* lisp/progmodes/scheme.el: Extend and clarify the commentary
regarding the 'scheme-indent-function' property of special forms.
2022-04-20 19:36:59 +03:00
Jean Abou Samra
6713b07e08
Define indentation behavior for a few more special Scheme forms
...
* lisp/progmodes/scheme.el: Define 'scheme-indent-function'
property for 'and-let*', 'with-syntax', 'eval-when;, and
pattern matching macros. (Bug#55033)
Copyright-paperwork-exempt: yes
2022-04-20 19:19:21 +03:00
Lars Ingebrigtsen
85db21b94b
Avoid hangs in python-mode with debug-on-error set
...
* lisp/progmodes/python.el (python-nav-end-of-statement): Avoid
using cl-assert here, because this is called from the font-lock
machinery, and if debug-on-error is set here, we'll hang Emacs
(bug#54996).
2022-04-18 13:17:32 +02:00
kobarity
078e1f289c
Fix fontifying type hints in python-mode
...
* lisp/progmodes/python.el
(python-font-lock-keywords-maximum-decoration): Avoid fontifying
type hints as variable names (bug#54992).
Copyright-paperwork-exempt: yes
2022-04-17 19:28:15 +02:00
Lars Ingebrigtsen
4d60d9face
Add a doc string to xref-current-item
...
* lisp/progmodes/xref.el (xref-after-jump-hook): Link to it.
(xref-current-item): Add a doc string to the now-public variable.
2022-04-17 12:17:30 +02:00
Eli Zaretskii
e8fd3a2a2d
Merge from origin/emacs-28
...
8c71ac606e
Fix fallout from lexical-binding in vhdl-mode.el
2022-04-16 13:43:32 -04:00
Lars Ingebrigtsen
d5b9b1a913
Document project-kill-buffers-display-buffer-list
...
* doc/emacs/maintaining.texi (Project Buffer Commands): Mention
project-kill-buffers-display-buffer-list.
* lisp/progmodes/project.el (project-kill-buffers): Link to
project-kill-buffers-display-buffer-list.
2022-04-16 17:30:32 +02:00
Philip Kaludercic
1a3bad431d
Update project-kill-buffer-conditions to match buffer-match-p
...
* project.el (project-kill-buffer-conditions): Document the
deprecation of the use of derived-mode
(project--buffer-check): Have `major-mode' behave like `derived-mode'
did previously, and issue a warning of `derived-mode' is used.
2022-04-15 10:06:36 +02:00
Alan Mackenzie
02b521ad74
CC Mode: Fix unwanted fontification of function call as function declaration
...
This happens when the enclosing function's return type is a struct, etc. This
fixes bug #54743 ;
* lisp/progmodes/cc-engine.el (c-update-brace-stack): Replace "(" by ")" in a
`member' call.
2022-04-10 12:20:39 +00:00
Lars Ingebrigtsen
8b3748c234
Fix sql-mode comment-end parsing
...
* lisp/progmodes/sql.el (sql-mode): Fix /* ... -*/ parsing
(bug#54769).
2022-04-09 12:28:58 +02:00
Davide Masserut
e32dcc7527
Add .bashrc detection to sh-mode
...
* lisp/progmodes/sh-script.el (sh-mode): Add .bashrc string-match
(bug#54727).
2022-04-06 11:38:08 +02:00
Eli Zaretskii
8c71ac606e
Fix fallout from lexical-binding in vhdl-mode.el
...
* lisp/progmodes/vhdl-mode.el (vhdl-update-sensitivity-list): Fix
production of a list with embedded function calls. (Bug#54730)
2022-04-05 21:15:32 +03:00
Stefan Monnier
74100997b3
* lisp/progmodes/cc-cmds.el (indent-new-comment-line): Delete advice
...
This piece of advice was effective only for Emacs<20.1 and old XEmacs
(at least older than Aug 2007).
2022-04-04 15:11:46 -04:00
Dmitry Gutov
d62b43f760
* lisp/progmodes/xref.el (xref-search-program): Fix typo.
2022-04-02 04:34:52 +03:00
Manuel Uberti
9468ab2570
Support ugrep in xref-search-program-alist
...
* lisp/progmodes/xref.el
(xref-search-program-alist)
(xref-search-program): Add entries for ugrep (bug#54608).
2022-04-02 04:31:33 +03:00
Michael Albinus
f8ff5689a2
; Improve readablity in grep.el
...
* lisp/progmodes/grep.el (grep-compute-defaults): Set a more
readable value for `grep-quoting-style'.
2022-03-26 10:40:16 +01:00
Michael Albinus
ef0a0d30c5
Make quoting of shell arguments in grep.el more robust
...
* lisp/progmodes/grep.el (grep-apply-setting)
(grep-compute-defaults): Adapt docstring.
(grep-quoting-style): New variable.
(grep-compute-defaults, grep-default-command)
(grep-expand-keywords, lgrep, rgrep-default-command): Use it.
2022-03-23 19:54:53 +01:00
Michael Albinus
fdbee9bc4c
Support changing remoteness of DIR in rgrep and lgrep
...
* lisp/net/tramp-sh.el (tramp-get-remote-dev-tty): New defun.
(tramp-sh-handle-make-process): Use it.
* lisp/progmodes/grep.el: Prefer #' to quote named functions.
(lgrep, rgrep): Recompute grep defaults when the remoteness of DIR
changes.
2022-03-23 16:04:57 +01:00
Michael Albinus
0094dde11d
Fix grep-like functions when running on a remote host
...
* doc/lispref/processes.texi (Shell Arguments):
* etc/NEWS: Describe change in 'shell-quote-argument'. Fix typos.
* lisp/subr.el (shell-quote-argument): New optional argument POSIX.
* lisp/progmodes/grep.el (grep-compute-defaults)
(grep-default-command, grep-expand-keywords, lgrep)
(rgrep-default-command): Use POSIX argument in
`shell-quote-argument'. (Bug#54487)
2022-03-22 10:29:16 +01:00
Dmitry Gutov
f0e8f4a4ca
Support indentation of Ruby pattern matching expressions
...
* lisp/progmodes/ruby-mode.el (ruby-smie-grammar, ruby-smie-rules)
(ruby-block-mid-keywords): Treat 'in' token similarly to 'when'.
* test/lisp/progmodes/ruby-mode-resources/ruby.rb:
Add indentation example.
2022-03-21 03:20:36 +02:00
Philipp Stephani
6ed3f04e5a
Fix a use of 'cl-defgeneric'.
...
* lisp/progmodes/xref.el (xref-match-length): Use 'cl-defmethod'
instead of 'cl-defgeneric'.
2022-03-17 12:58:52 +01:00
Colin Woodbury
139042eb86
* lisp/progmodes/python.el: Account for new keywords.
...
* lisp/progmodes/python.el (python-font-lock-keywords-level-2): As
of Python 3.10, Python has structured pattern matching. This adds
two new keywords which need to be highlighted (bug#54345).
2022-03-12 18:46:55 +01:00
Stefan Kangas
5f87550f53
Merge from origin/emacs-28
...
80736aef90
Fix which-func-update doc string
d9e5ae5e20
Improve wording of 'dired-jump's description
2022-03-08 06:32:57 +01:00
Lars Ingebrigtsen
80736aef90
Fix which-func-update doc string
...
* lisp/progmodes/which-func.el (which-func-update): Make the doc
string match the code (bug#54288).
2022-03-07 16:19:27 +01:00
Gustaf Waldemarson
f70bf8a21d
Display complex data types in gdb-mi
...
* lisp/progmodes/gdb-mi.el (bindat): Require.
(gdb-invalidate-locals): Use `-stack-list-variables` instead of
the deprecated `-stack-list-locals`. Additionally, this allow
function arguments to be displayed in the locals buffer.
(gdb-locals-values-buffer, gdb-locals-values-buffer-name)
(gdb-locals-simple-values-only, gdb-locals-values-table): New
variables.
(gdb-locals-values-handler-custom): Create a new gdb buffer for
extracting local variable values. To
extract the values for 'complex' data-types, the command
`-stack-list-locals` is used with the `--all-values` flag.
The extracted values are then stored in a hash-table for later use in
the `gdb-locals-handler-custom` that performs the actual update of the
Local variable buffer.
All variable values are filtered to fit it into a single line, being
truncated as necessary by the user customizable option
`gdb-locals-value-limit`.
The old behavior of hiding complex values can be restored using the
customizable `gdb-locals-simple-values-only` option.
Patch amended by William Xu <william.xwl@gmail.com>.
2022-03-06 22:56:04 +01:00
Dmitry Gutov
a658be7742
project-shell: Ensure the resulting buffer is live
...
* lisp/progmodes/project.el (project-shell):
Make sure to recreate the shell if the buffer exists but not live
(https://lists.gnu.org/archive/html/emacs-devel/2022-03/msg00017.html ).
2022-03-05 04:33:10 +02:00
Lars Ingebrigtsen
b6587090bf
Fix clobbering of match data in executable-set-magic
...
* lisp/progmodes/executable.el (executable-set-magic): Switching
buffers may clobber match data, so save the match data first
(bug#54218).
2022-03-03 15:43:35 +01:00
Dmitry Gutov
86969f9658
Cache the backend value together with the project root
...
* lisp/progmodes/project.el (project-try-vc):
Cache the backend value together with the root.
(project-root, project-files, project-ignores):
Update to access the new data structure.
2022-03-03 05:41:46 +02:00
Dmitry Gutov
890b08e415
* lisp/progmodes/xref.el: Bump the version.
2022-03-03 04:55:23 +02:00
Stefan Kangas
1de7382b57
Merge from origin/emacs-28
...
e77fc8262a
Update to Org 9.5.2-22-g33543d
9bce4b67f1
; * lisp/help.el (with-help-window): Doc fix. (Bug#54170)
558b03a958
Add explicit '--no-heading' for ripgrep
2022-02-28 06:33:06 +01:00
Dmitry Gutov
558b03a958
Add explicit '--no-heading' for ripgrep
...
* lisp/progmodes/xref.el (xref-search-program-alist):
Add explicit '--no-heading' for ripgrep (bug#54177).
2022-02-27 15:28:04 +02:00
Manuel Uberti
bc0d1f1c46
Add project-ignore-buffer-conditions
...
* lisp/progmodes/project.el (project-ignore-buffer-conditions):
New defcustom.
(project--read-project-buffer):
Use it (bug#54100).
2022-02-27 05:25:01 +02:00
Dmitry Gutov
018eeb655a
Drop the visited file modtime check for remote xref hits
...
* lisp/progmodes/xref.el (xref--hits-remote-id): New variable.
(xref--convert-hits, xref--collect-matches)
(xref--find-file-buffer): Use it (bug#54025).
2022-02-26 02:27:30 +02:00
Dmitry Gutov
fa2b60615b
xref--find-file-buffer: Check modified-p and modtime
...
* lisp/progmodes/xref.el (xref--find-file-buffer):
Check whether the buffer contents match what's on disk
(bug#54025).
2022-02-25 03:35:51 +02:00
Dmitry Gutov
0f67a3df0e
Unbreak project switcher when inside *xref* buffer
...
* lisp/progmodes/xref.el (xref--ensure-default-directory):
New function.
(xref--show-xref-buffer, xref-show-definitions-buffer-at-bottom):
Use it (bug#53626).
2022-02-23 03:53:16 +02:00
Dmitry Gutov
f0ac4b7797
Bump xref.el version.
...
* lisp/progmodes/xref.el: Bump version to 1.4.0.
2022-02-21 04:15:39 +02:00
Dmitry Gutov
3d106897fd
Public-ize xref-show-xrefs
...
* lisp/progmodes/xref.el (xref-show-xrefs):
New function (wrapper for an older, private one, bug#42967).
2022-02-21 03:57:27 +02:00
Dmitry Gutov
3d2c213ce9
Public-ize xref-current-item
...
* lisp/progmodes/xref.el (xref--current-item):
Rename to 'xref-current-item' (bug#53956). Update all references.
2022-02-21 02:59:50 +02:00
Eli Zaretskii
3306e11107
Merge from origin/emacs-28
...
1e4b04c
Improve documentation of filling and justification commands
9fd396e
* lisp/progmodes/subword.el (superword-mode): Doc fix. (Bug#...
e303cb1
Fix indexing of module functions that return complex types.
2022-02-18 10:38:53 +02:00
Eli Zaretskii
9fd396e4d0
* lisp/progmodes/subword.el (superword-mode): Doc fix. (Bug#54045)
2022-02-18 09:01:06 +02:00
Alan Mackenzie
6548286446
Note current buffer and restore it in c-force-redisplay.
...
This fixes bug #52709 .
* lisp/progmodes/cc-fonts.el (c-force-redisplay): New parameter BUFFER. Set
current buffer to this before fontifying.
(c-fontify-new-found-type): Give the current buffer as argument to
run-with-timer.
2022-02-10 17:03:50 +00:00