aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Update project-kill-buffer-conditions to match buffer-match-pPhilip Kaludercic2022-04-151-16/+24
| | | | | | | * 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.
* CC Mode: Fix unwanted fontification of function call as function declarationAlan Mackenzie2022-04-101-1/+1
| | | | | | | | 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.
* Fix sql-mode comment-end parsingLars Ingebrigtsen2022-04-091-1/+12
| | | | | * lisp/progmodes/sql.el (sql-mode): Fix /* ... -*/ parsing (bug#54769).
* Add .bashrc detection to sh-modeDavide Masserut2022-04-061-1/+1
| | | | | * lisp/progmodes/sh-script.el (sh-mode): Add .bashrc string-match (bug#54727).
* * lisp/progmodes/cc-cmds.el (indent-new-comment-line): Delete adviceStefan Monnier2022-04-041-12/+0
| | | | | This piece of advice was effective only for Emacs<20.1 and old XEmacs (at least older than Aug 2007).
* * lisp/progmodes/xref.el (xref-search-program): Fix typo.Dmitry Gutov2022-04-021-1/+1
|
* Support ugrep in xref-search-program-alistManuel Uberti2022-04-021-1/+3
| | | | | | * lisp/progmodes/xref.el (xref-search-program-alist) (xref-search-program): Add entries for ugrep (bug#54608).
* ; Improve readablity in grep.elMichael Albinus2022-03-261-1/+1
| | | | | * lisp/progmodes/grep.el (grep-compute-defaults): Set a more readable value for `grep-quoting-style'.
* Make quoting of shell arguments in grep.el more robustMichael Albinus2022-03-231-62/+67
| | | | | | | | * 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.
* Support changing remoteness of DIR in rgrep and lgrepMichael Albinus2022-03-231-24/+30
| | | | | | | | | * 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.
* Fix grep-like functions when running on a remote hostMichael Albinus2022-03-221-52/+59
| | | | | | | | | | | | * 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)
* Support indentation of Ruby pattern matching expressionsDmitry Gutov2022-03-211-5/+7
| | | | | | | | * 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.
* Fix a use of 'cl-defgeneric'.Philipp Stephani2022-03-171-1/+1
| | | | | * lisp/progmodes/xref.el (xref-match-length): Use 'cl-defmethod' instead of 'cl-defgeneric'.
* * lisp/progmodes/python.el: Account for new keywords.Colin Woodbury2022-03-121-0/+2
| | | | | | * 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).
* Merge from origin/emacs-28Stefan Kangas2022-03-081-1/+1
|\ | | | | | | | | 80736aef90 Fix which-func-update doc string d9e5ae5e20 Improve wording of 'dired-jump's description
| * Fix which-func-update doc stringLars Ingebrigtsen2022-03-071-1/+1
| | | | | | | | | | * lisp/progmodes/which-func.el (which-func-update): Make the doc string match the code (bug#54288).
* | Display complex data types in gdb-miGustaf Waldemarson2022-03-061-5/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>.
* | project-shell: Ensure the resulting buffer is liveDmitry Gutov2022-03-051-1/+6
| | | | | | | | | | | | * 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).
* | Fix clobbering of match data in executable-set-magicLars Ingebrigtsen2022-03-031-6/+7
| | | | | | | | | | | | * lisp/progmodes/executable.el (executable-set-magic): Switching buffers may clobber match data, so save the match data first (bug#54218).
* | Cache the backend value together with the project rootDmitry Gutov2022-03-031-29/+32
| | | | | | | | | | | | | | * 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.
* | * lisp/progmodes/xref.el: Bump the version.Dmitry Gutov2022-03-031-1/+1
| |
* | Merge from origin/emacs-28Stefan Kangas2022-02-281-1/+1
|\ \ | |/ | | | | | | | | 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
| * Add explicit '--no-heading' for ripgrepDmitry Gutov2022-02-271-1/+1
| | | | | | | | | | * lisp/progmodes/xref.el (xref-search-program-alist): Add explicit '--no-heading' for ripgrep (bug#54177).
* | Add project-ignore-buffer-conditionsManuel Uberti2022-02-271-10/+37
| | | | | | | | | | | | | | * lisp/progmodes/project.el (project-ignore-buffer-conditions): New defcustom. (project--read-project-buffer): Use it (bug#54100).
* | Drop the visited file modtime check for remote xref hitsDmitry Gutov2022-02-261-5/+7
| | | | | | | | | | | | * lisp/progmodes/xref.el (xref--hits-remote-id): New variable. (xref--convert-hits, xref--collect-matches) (xref--find-file-buffer): Use it (bug#54025).
* | xref--find-file-buffer: Check modified-p and modtimeDmitry Gutov2022-02-251-4/+10
| | | | | | | | | | | | * lisp/progmodes/xref.el (xref--find-file-buffer): Check whether the buffer contents match what's on disk (bug#54025).
* | Unbreak project switcher when inside *xref* bufferDmitry Gutov2022-02-231-2/+9
| | | | | | | | | | | | | | * lisp/progmodes/xref.el (xref--ensure-default-directory): New function. (xref--show-xref-buffer, xref-show-definitions-buffer-at-bottom): Use it (bug#53626).
* | Bump xref.el version.Dmitry Gutov2022-02-211-1/+1
| | | | | | | | * lisp/progmodes/xref.el: Bump version to 1.4.0.
* | Public-ize xref-show-xrefsDmitry Gutov2022-02-212-4/+10
| | | | | | | | | | * lisp/progmodes/xref.el (xref-show-xrefs): New function (wrapper for an older, private one, bug#42967).
* | Public-ize xref-current-itemDmitry Gutov2022-02-211-6/+11
| | | | | | | | | | * lisp/progmodes/xref.el (xref--current-item): Rename to 'xref-current-item' (bug#53956). Update all references.
* | Merge from origin/emacs-28Eli Zaretskii2022-02-181-2/+2
|\ \ | |/ | | | | | | | | 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.
| * * lisp/progmodes/subword.el (superword-mode): Doc fix. (Bug#54045)Eli Zaretskii2022-02-181-2/+2
| |
* | Note current buffer and restore it in c-force-redisplay.Alan Mackenzie2022-02-101-4/+6
| | | | | | | | | | | | | | | | | | 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.
* | Merge from origin/emacs-28Stefan Kangas2022-02-101-2/+2
|\ \ | |/ | | | | | | 69e82968d7 Fix integer arithmetic miss-compilation (bug#53451) 31af9bca99 Mark flymake as compatible with emacs-26.1
| * Mark flymake as compatible with emacs-26.1Robert Pluim2022-02-081-2/+2
| | | | | | | | | | * lisp/progmodes/flymake.el: Bump package version and set emacs version in Package-Requires to 26.1 (Bug#53853).
* | Merge from origin/emacs-28Stefan Kangas2022-02-091-2/+2
|\ \ | |/ | | | | 82e74e4559 flymake: Ensure compatibility with older Emacsen
| * flymake: Ensure compatibility with older EmacsenBrian Leung2022-02-081-2/+2
| | | | | | | | | | | | * lisp/progmodes/flymake.el (flymake--log-1): Use replace-regexp-in-string instead of Emacs 28's string-replace (bug#53853).
* | * lisp/progmodes/xref.el (xref--marker-ring): Fix typoStefan Monnier2022-02-071-1/+1
| |
* | Improve indentation of some shell script formsLars Ingebrigtsen2022-02-071-9/+15
| | | | | | | | | | * lisp/progmodes/sh-script.el (sh-smie--default-backward-token): Don't skip past things like "true;then" (bug#53817).
* | (with-demoted-errors): Warn on missing `format` argStefan Monnier2022-02-042-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `format` arg has been mandatory for a while, but the backward compatibility code that handled the case of a missing `format` arg made it hard to notice when using the old calling convention. * lisp/subr.el (with-demoted-errors): Warn on missing `format` arg. * lisp/emacs-lisp/smie.el (smie-indent--separator-outdent): Don't abuse `with-demoted-errors`. (smie-indent-line, smie-auto-fill): * test/lisp/emacs-lisp/ert-tests.el (ert-test-with-demoted-errors): * lisp/vc/vc-hooks.el (vc-refresh-state): * lisp/vc/vc-annotate.el (vc-annotate-background-mode): * lisp/vc/diff-mode.el (diff-syntax-fontify-hunk): * lisp/textmodes/reftex-toc.el (reftex-re-enlarge): * lisp/progmodes/sh-script.el (sh-smie-sh-rules): * lisp/progmodes/octave.el (inferior-octave-startup): * lisp/pcmpl-gnu.el (pcmpl-gnu-make-all-targets): * lisp/org/org-refile.el (org-refile): * lisp/org/org-capture.el (org-capture-store-last-position): * lisp/nxml/nxml-mode.el (nxml-mode): * lisp/notifications.el (notifications-notify): * lisp/gnus/mm-view.el (mm-display-inline-fontify): * lisp/finder.el (finder-unload-function): * lisp/files.el (safe-local-variable-p, backup-buffer-copy * lisp/autorevert.el (auto-revert-notify-handler): Pass `format` arg to `with-demoted-errors`.
* | python.el: Silence left over warning in last commitStefan Monnier2022-02-041-0/+1
| | | | | | | | | | | | * lisp/progmodes/python.el (python-shell-calculate-process-environment): Declare tramp-remote-process-environment before using it.
* | python.el: Try and better split the Tramp codeStefan Monnier2022-02-041-165/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Massage the Python-Tramp code so that the Tramp part and the Python part are a bit less intertwined. It's still not quite right, but it's a bit closer to the point where the Tramp part can be moved to `tramp.el`. * lisp/progmodes/python.el: Don't require `tramp-sh`. Do require `subr-x` OTOH. Remove redundant `:group`s. (python-shell--calculate-process-environment): New function, that only return the entries to be added. (python-shell-calculate-process-environment): Rewrite and declare obsolete. (python-shell-tramp-refresh-remote-path) (python-shell-tramp-refresh-process-environment): Silence compiler warnings. (python-shell-with-environment): Move the bulk of its code to a new function `python-shell--with-environment` for easier debugging and to avoid code duplication. (python-shell--with-environment): New function. Split the Tramp case into its own function. (python-shell--tramp-with-environment): New function. (python-eldoc-function-timeout-permanent): Fix doc's first line. * test/lisp/progmodes/python-tests.el: Adjust accordingly. (python-shell-calculate-process-environment-1) (python-shell-calculate-process-environment-2) (python-shell-calculate-process-environment-3) (python-shell-calculate-process-environment-4) (python-shell-calculate-process-environment-5) (python-shell-calculate-process-environment-6) (python-shell-calculate-process-environment-7) (python-shell-calculate-process-environment-8): Use `python-shell--calculate-process-environment`. (python--tests-process-env-canonical, python--tests-process-env-eql): New functions. (python-shell-with-environment-2, python-shell-with-environment-3): Use them.
* | ; cperl-mode.el: Detect prototypes in anonymous subroutinesHarald Jörg2022-02-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | My commit 3d49ad73e5a from 2021-09-143 had a flaw causing bad fontification and indentation after anonymous subroutines with a prototype. * lisp/progmodes/cperl-mode.el (cperl-find-pods-heres): Correctly process prototypes in anonymous subroutines * test/lisp/progmodes/cperl-mode-tests.el (cperl-test-fontify-attrs-and-signatures): new tests for various combinations of attributes, prototypes, and signatures * test/lisp/progmodes/cperl-mode-resources/proto-and-attrs.pl: new test source
* | * lisp/replace.el (query-replace-read-from-default): New variable.Juri Linkov2022-02-012-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | (query-replace-read-from-regexp-default): New variable. (query-replace-read-from): Use new variables. * lisp/progmodes/project.el (project-query-replace-regexp): Let-bind query-replace-read-from-regexp-default to find-tag-default-as-regexp. * lisp/progmodes/xref.el (xref-find-references-and-replace): Let-bind query-replace-read-from-default to find-tag-default. https://lists.gnu.org/archive/html/emacs-devel/2022-01/msg01909.html
* | * lisp/progmodes/cc-mode.el (c-common-init): Bind case-fold-search to nilAlan Mackenzie2022-01-311-37/+38
| | | | | | | | This fixes bug #53605.
* | Add setx highlighting to bat-modeArni Magnusson2022-01-271-3/+3
| | | | | | | | | | * lisp/progmodes/bat-mode.el (bat-font-lock-keywords): (bat-font-lock-keywords): Highlight setx (bug#53568).
* | Don't loop so much in gud-query-cmdline on remote systemsLars Ingebrigtsen2022-01-241-7/+12
| | | | | | | | | | * lisp/progmodes/gud.el (gud-query-cmdline): Avoid looping over large numbers of files on remote systems (bug#21528).
* | Add "then" to sh--completion-keywordsLars Ingebrigtsen2022-01-241-1/+1
| | | | | | | | | | * lisp/progmodes/sh-script.el (sh--completion-keywords): Allow completing over "then" (bug#53490).
* | Improve scheme-imenu-generic-expressionAlex Kost2022-01-231-6/+47
| | | | | | | | | | * lisp/progmodes/scheme.el (scheme-imenu-generic-expression): Improve so that we match `define-public' etc (bug#33117).
* | ruby-toggle-block-space-before-parameters: New user optionDmitry Gutov2022-01-211-7/+15
| | | | | | | | | | | | | | | | | | * lisp/progmodes/ruby-mode.el (ruby-toggle-block-space-before-parameters): New user option (bug#53321). (ruby-do-end-to-brace): Handle it. * test/lisp/progmodes/ruby-mode-tests.el (ruby-toggle-block-to-brace-no-space): New test.