aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* | ; * lisp/progmodes/python.el (python--backend-toggle): Use cond.Yuan Fu2022-10-181-13/+16
| |
* | Install new toggle scheme for tree-sitterYuan Fu2022-10-181-36/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Basically we now have treesit-mode and global-treesit-mode. Major modes set major-mode-backend-function which treesit-mode calls to activate/deactivate tree-sitter. js.el needs a bit explanation: I'm so sorry for messing up the history, but basically now js-mode and js-json-mode should be exactly the same as before any tree-sitter change was introduced, sans some initialization code that are moved to js(-json)--backend-toggle. js-mode and js-json-mode now just sets major-mode-backend-function and initialize with js(-json)--backend-toggle. * lisp/treesit.el (treesit-mode-inhibit-message): New option. (treesit-can-enable-p): Remove function. (major-mode-backend-function) (treesit-remapped-major-mode-alist): New variables. (treesit-mode) (global-treesit-mode): New minor modes. (global-treesit-mode--turn-on) (treesit-ready-p): New functions. * lisp/progmodes/python.el: Remove option. (python--backend-toggle): New function. (python-mode): Remove the if-form, all the initialization code are moved to python--backend-toggle, python-mode now just sets major-mode-backend-function and initialize with python--backend-toggle. * lisp/progmodes/js.el (js--treesit-can-enable-p) (js--json-treesit-can-enable-p) (js--treesit-enable) (js--json-treesit-enable): Remove functions. (js--backend-toggle) (js-json--backend-toggle): New function. * lisp/progmodes/ts-mode.el (ts-mode): Use treesit-ready-p.
* | Rework tree-sitter font-lockYuan Fu2022-10-131-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove :toggle and :level, add :feature. * lisp/progmodes/js.el (js--treesit-settings): Add :feature. (js--treesit-enable): Set treesit-font-lock-feature-list. * lisp/progmodes/python.el: Replace :level with :feature. (python-mode): Set treesit-font-lock-feature-list. * lisp/treesit.el (treesit-font-lock-feature-list): New variable. (treesit-font-lock-settings): Change format. (treesit-font-lock-rules): Remove :toggle and :level, add :feature. (treesit-font-lock-recompute-features): New function. (treesit-font-lock-fontify-region): Change to work with the new format. (treesit-font-lock-enable): Add call to treesit-font-lock-recompute-features. And improve the font-lock-mode workaround.
* | Add :version tag for new tree-sitter custom optionsYuan Fu2022-10-091-1/+2
| | | | | | | | | | | | * lisp/progmodes/python.el (python-use-tree-sitter): Add version tag. * lisp/treesit.el (treesit): (treesit-max-buffer-size): Add version tag.
* | Make python tree-sitter font-lock support decoration levelsYuan Fu2022-10-091-12/+16
| | | | | | | | | | * lisp/progmodes/python.el (python--treesit-settings): Stratify into three levels.
* | Merge branch 'master' into feature/tree-sitterYuan Fu2022-10-051-73/+363
|\ \ | |/
| * Fix syntax check in python-info-looking-at-beginning-of-defunkobarity2022-09-231-5/+5
| | | | | | | | | | | | | | | | | | * lisp/progmodes/python.el (python-info-looking-at-beginning-of-defun): Check syntax after moving to the beginning of line. * test/lisp/progmodes/python-tests.el (python-nav-beginning-of-defun-6) (python-end-of-defun-1, python-info-looking-at-beginning-of-defun-3): New tests (bug#58023).
| * Merge from origin/emacs-28Stefan Kangas2022-09-211-2/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 478b786d5a ; * doc/lispref/windows.texi (Window Hooks): Fix a typo (b... 5085351645 * lisp/text-modes/tex-mode.el (tex-mode): Fix AUCTeX regre... ee6f8598ca Add vc-annotate-switches to manual 616dcf27e5 ; Fix typos in Lisp symbols 5405852541 Remove mention of non-existent `annotate-switches' 191505b8a3 Mention that src/macuvs.h sometimes needs committing 10373c4b68 ; More comment fixes in font.h (bug#57935) c2595b8dcc ; * src/font.h (struct font_driver): Comment fix. 97b928ce09 MacOS ld warning from native compilation (bug#57849)
| | * ; Fix typos in Lisp symbolsStefan Kangas2022-09-201-2/+2
| | |
| | * Fix customization-group of 'python-forward-sexp-function'Eli Zaretskii2022-04-211-0/+2
| | | | | | | | | | | | | | | | | | * lisp/progmodes/python.el (python-forward-sexp-function): Make it be part of both 'python' and 'python-flymake' groups. (Bug#55027) Do not merge to master.
| | * Avoid hangs in python-mode with debug-on-error setLars Ingebrigtsen2022-04-181-17/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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). Do not merge to master.
| * | Remap 'up-list' in python-mode-mapAugusto Stoffel2022-09-181-0/+1
| | | | | | | | | | | | | | | * lisp/progmodes/python.el (python-mode-map): Remap 'up-list' to 'python-nav-up-list' (bug#57885).
| * | Add new command python-shell-restartAugusto Stoffel2022-09-181-0/+20
| | | | | | | | | | | | * lisp/progmodes/python.el (python-shell-restart): New command (bug#57885).
| * | Delete many items obsolete since 24.3Stefan Kangas2022-09-091-34/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/allout.el (allout-exposure-change-hook) (allout-structure-added-hook, allout-structure-deleted-hook) (allout-structure-shifted-hook): * lisp/arc-mode.el (archive-extract-hooks): * lisp/buff-menu.el (Buffer-menu-buffer+size-width): * lisp/calendar/timeclock.el (timeclock-modeline-display) (timeclock-modeline-display, timeclock-update-modeline): * lisp/cedet/semantic/db-el.el (semanticdb-elisp-sym-function-arglist): * lisp/cedet/semantic/db-file.el (semanticdb-save-database-hooks): * lisp/cedet/semantic/edit.el (semantic-change-hooks) (semantic-edits-new-change-hooks) (semantic-edits-delete-change-hooks) (semantic-edits-reparse-change-hooks): * lisp/cedet/semantic/lex.el (semantic-lex-reset-hooks): * lisp/comint.el (comint--unquote&expand-filename) (comint-unquote-filename): * lisp/custom.el (user-variable-p): * lisp/dired.el (dired-shrink-to-fit, dired-pop-to-buffer) (dired-sort-set-modeline): * lisp/ebuff-menu.el (Electric-buffer-menu-mode): * lisp/emacs-lisp/byte-run.el (macro-declaration-function): * lisp/emacs-lisp/checkdoc.el (custom-print-functions) (checkdoc-comment-style-hooks): * lisp/emacs-lisp/cl-lib.el (custom-print-functions): * lisp/emacs-lisp/edebug.el (gud-inhibit-global-bindings): * lisp/erc/erc-dcc.el (erc-dcc-chat-filter-hook): * lisp/eshell/esh-mode.el (eshell-status-in-modeline): * lisp/eshell/eshell.el (eshell-add-to-window-buffer-names) (eshell-remove-from-window-buffer-names): * lisp/faces.el (set-face-underline-p, font-list-limit): * lisp/files.el (automount-dir-prefix, toggle-read-only): * lisp/filesets.el (filesets-cache-fill-content-hooks): * lisp/frame.el (automatic-hscrolling): * lisp/generic-x.el (javascript-generic-mode) (javascript-generic-mode-hook): * lisp/gnus/gnus-start.el (gnus-subscribe-newsgroup-hooks): * lisp/gnus/nndiary.el (nndiary-request-create-group-hooks) (nndiary-request-update-info-hooks) (nndiary-request-accept-article-hooks): * lisp/htmlfontify.el (hfy-post-html-hooks): * lisp/international/mule-cmds.el (inactivate-current-input-method-function) (inactivate-input-method, input-method-inactivate-hook) (ucs-insert): * lisp/international/quail.el (quail-inactivate) (quail-inactivate-hook): * lisp/international/robin.el (robin-inactivate) (robin-inactivate-hook): * lisp/leim/quail/hangul.el (hangul-input-method-inactivate): * lisp/leim/quail/uni-input.el (ucs-input-inactivate): * lisp/mail/emacsbug.el (report-emacs-bug-info): * lisp/mh-e/mh-e.el (mh-kill-folder-suppress-prompt-hooks): * lisp/mpc.el (mpc-string-prefix-p): * lisp/net/rcirc.el (rcirc-print-hooks, rcirc-sentinel-hooks) (rcirc-receive-message-hooks, rcirc-activity-hooks): * lisp/obsolete/crisp.el (crisp-mode-modeline-string): * lisp/pcomplete.el (pcomplete-arg-quote-list) (pcomplete-quote-argument): * lisp/progmodes/cc-mode.el (c-prepare-bug-report-hooks): * lisp/progmodes/python.el (python-info-ppss-context) (python-info-ppss-context-type) (python-info-ppss-comment-or-string-p, python-indent) (python-guess-indent, python-buffer, python-preoutput-result) (python-proc, python-send-receive, python-send-string) (python-use-skeletons): * lisp/progmodes/sh-script.el (sh-maybe-here-document): * lisp/replace.el (query-replace-interactive): * lisp/strokes.el (strokes-modeline-string): * lisp/subr.el (redraw-modeline): * lisp/term.el (term-default-fg-color, term-default-bg-color): * lisp/textmodes/tex-mode.el (latex-string-prefix-p) (tex-string-prefix-p): * lisp/url/url-parse.el (url-recreate-url-attributes): * lisp/vc/add-log.el (change-log-acknowledgement): * lisp/vc/ediff-wind.el (ediff-choose-window-setup-function-automatically): * lisp/vc/pcvs-util.el (cvs-string-prefix-p): * lisp/vc/vc.el (vc-string-prefix-p): * lisp/window.el (display-buffer-function): * lisp/winner.el (winner-mode-leave-hook): Remove many functions and variables obsolete since 24.3. * lisp/buff-menu.el (list-buffers--refresh): * lisp/dired.el (dired-mode-map): * lisp/files.el (abbreviate-file-name): * lisp/generic-x.el (generic-default-modes): * lisp/mh-e/mh-funcs.el (mh-kill-folder): * lisp/progmodes/hideif.el (hide-ifdef-mode-submap): * lisp/replace.el (query-replace-read-from): * lisp/term.el (term): * lisp/window.el (display-buffer): Don't use above deleted functions and variables. * src/marker.c (Fbuffer_has_markers_at): Delete DEFUN obsolete since 24.3. (syms_of_marker) <Sbuffer_has_markers_at>: Delete defsubr. * lisp/subr.el (buffer-has-markers-at): Remove obsoletion of above deleted DEFUN. * etc/TODO: Doc fix; don't mention above deleted function. * admin/cus-test.el (cus-test-get-options): * lisp/pcomplete.el: Doc fixes; don't mention removed items. ; * etc/NEWS: List removed items.
| * | Apply syntax highlighting for all python f-stringsLaurence Warne2022-09-061-3/+14
| | | | | | | | | | | | | | | | | | * lisp/progmodes/python.el (python--f-string-p) (python--font-lock-f-strings): Edit functions to use a regular expression matching all f-strings (bug#56757).
| * | Add Python import management commandsAugusto Stoffel2022-09-041-5/+265
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/python.el (python-interpreter): New variable (python-mode-map): Keybindings and menu entries for new commands (python--list-imports, python-import-history, python--query-import) (python--do-isort): New variables and helper functions. (python-add-import, python-import-symbol-at-point) (python-remove-import, python-sort-imports, python-fix-imports): New interactive commands (bug#57574).
| * | Python shells dedicated to a projectAugusto Stoffel2022-09-041-24/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/python.el: Require 'seq' and (optionally) 'compat' and 'project' libraries. (python-shell-dedicated): New user option (python-shell-get-process-name): Adapt to project-dedicated shells. (run-python): Offer possibility to create a project-dedicated shell, or use 'python-shell-dedicated' as the default behavior. (python-shell-get-buffer): Adapt to project-dedicated shells (bug#56997).
* | | Add :override flag for python tree-sitter font-lock settingsYuan Fu2022-10-041-0/+1
| | | | | | | | | | | | * lisp/progmodes/python.el (python--treesit-settings): Add :override.
* | | Fix python tree-sitter font-lockYuan Fu2022-10-041-1/+9
| | | | | | | | | | | | | | | | | | | | | Add fontification for lhs attribute and some operators. * lisp/progmodes/python.el (python--treesit-keywords): Add operators. (python--treesit-settings): Add lhs attribute.
* | | ; * lisp/progmodes/python.el (python-mode): Fix typo.Yuan Fu2022-09-241-1/+1
| | |
* | | Update and enable treesit-imenu function in python.elYuan Fu2022-09-241-45/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/python.el (python--treesit-settings): Add docstring. (python--imenu-treesit-create-index-1): Rewrite with treesit-induce-sparse-tree. (python-imenu-treesit-create-index): Move main body to python--imenu-treesit-create-index-1. (python-imenu-treesit-create-flat-index): Fix typo. (python-mode): Enable treesit-imenu. Also fix indentation for which-func code.
* | | Utilize tree-sitter in python.elYuan Fu2022-09-221-4/+242
|/ / | | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/python.el (python-use-tree-sitter): New option. (python--treesit-keywords, python--treesit-builtins) (python--treesit-constants, python--treesit-operators) (python--treesit-special-attributes, python--treesit-exceptions): New variables. (python--treesit-fontify-string, python--treesit-settings) (python--imenu-treesit-create-index) (python--imenu-treesit-create-flat-index) (python-info-treesit-current-defun): New functions. (python-mode): Enable tree-sitter font-lock and which-func.
* | Add Python blocks support for hideshowkobarity2022-08-251-6/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/python.el (python-nav-beginning-of-block-regexp): New variable. (python-hideshow-forward-sexp-function): Change to call `python-nav-end-of-block'. (python-hideshow-find-next-block): New function to be used as FIND-NEXT-BLOCK-FUNC in `hs-special-modes-alist'. (python-info-looking-at-beginning-of-block): New function to be used as LOOKING-AT-BLOCK-START-P-FUNC in `hs-special-modes-alist'. (python-mode): Change settings of `hs-special-modes-alist'. * test/lisp/progmodes/python-tests.el (python-hideshow-hide-levels-1): Fix to keep empty lines. (python-info-looking-at-beginning-of-block-1) (python-hideshow-hide-levels-3, python-hideshow-hide-levels-4) (python-hideshow-hide-all-1, python-hideshow-hide-all-2) (python-hideshow-hide-all-3, python-hideshow-hide-block-1): New tests (bug#56635).
* | Fix completion-predicate of Python shell commandsAugusto Stoffel2022-08-231-1/+9
| | | | | | | | | | | | * lisp/progmodes/python.el: Change some completion predicates. (python-shell--completion-predicate): New completion predicate function. (Bug#57184)
* | python.el: Add completion-predicate symbol property to commandsAugusto Stoffel2022-08-191-7/+61
| | | | | | | | | | | | | | | | | | * lisp/progmodes/python.el: Add a completion-predicate property to most commands defined in this file; some are only useful in python-mode, others in inferior-python mode as well. (Bug#53913) (python-skeleton-define, python-define-auxiliary-skeleton): Add appropriate completion-predicate properties. (python--completion-predicate): New function.
* | python-mode: Remove special outline-heading-end-regexpAugusto Stoffel2022-08-191-1/+0
| | | | | | | | | | | | | | | | It doesn't work well with the new type annotation syntax introduced in Python 3.5. * lisp/progmodes/python.el (python-mode): Remove buffer-local setting of outline-heading-end-regexp. (Bug#53913)
* | python.el: Adjustments to Flymake backendAugusto Stoffel2022-08-191-5/+9
| | | | | | | | | | | | | | * lisp/progmodes/python (python-flymake-command): Advertise possiblity to use pylint. (python-flymake-command-output-pattern): Make compatible with recent versions of pyflakes. (Bug#53913)
* | python-check-command: Don't use absolute file namesAugusto Stoffel2022-08-191-4/+5
| | | | | | | | | | | | | | | | Absolute executable file names are incompatible with Tramp and packages that switch between virtualenvs. * lisp/progmodes/python.el (python-check-command): Don't use absolute file names. (Bug#53913)
* | Fix Python indentation of block continuationkobarity2022-08-181-1/+7
| | | | | | | | | | | | | | | | * lisp/progmodes/python.el (python-indent--calculate-indentation): Fix indentation of :after-backslash-block-continuation. * test/lisp/progmodes/python-tests.el (python-indent-after-backslash-6): New test (bug#57262).
* | Enhance Python font-lock to support multilineskobarity2022-08-171-16/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/progmodes/python-tests.el (python-tests-assert-faces-after-change): New helper function. (python-font-lock-keywords-level-1-3) (python-font-lock-assignment-statement-multiline-*): New tests. * lisp/progmodes/python.el (python-rx): Add `sp-nl' to represent space or newline (with/without backslash). (python-font-lock-keywords-level-1) (python-font-lock-keywords-maximum-decoration): Allow newlines where appropriate. (python-font-lock-extend-region): New function. (python-mode): Set `python-font-lock-extend-region' to `font-lock-extend-after-change-region-function'.
* | Revert "Add Python blocks support for hideshow"Lars Ingebrigtsen2022-08-171-53/+6
| | | | | | | | | | | | This reverts commit af4cfb519415ed3c1d6d036aac908e4f9ee383eb. This led to test failures.
* | Add Python blocks support for hideshowkobarity2022-08-171-6/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/python.el (python-nav-beginning-of-block-regexp): New variable. (python-hideshow-forward-sexp-function): Change to call `python-nav-end-of-block'. (python-hideshow-find-next-block): New function to be used as FIND-NEXT-BLOCK-FUNC in `hs-special-modes-alist'. (python-info-looking-at-beginning-of-block): New function to be used as LOOKING-AT-BLOCK-START-P-FUNC in `hs-special-modes-alist'. (python-mode): Change settings of `hs-special-modes-alist'. * test/lisp/progmodes/python-tests.el (python-hideshow-hide-levels-1): Fix to keep empty lines. (python-info-looking-at-beginning-of-block-1) (python-hideshow-hide-levels-3, python-hideshow-hide-levels-4) (python-hideshow-hide-all-1, python-hideshow-hide-all-2) (python-hideshow-hide-all-3, python-hideshow-hide-block-1): New tests (bug#56635).
* | Fix `python-nav-forward-block' moving backward under certain conditionskobarity2022-08-151-2/+4
| | | | | | | | | | * lisp/progmodes/python.el (python-nav-forward-block): Add check for not moving backward (bug#57223).
* | Fix python escape code fontification for multi-line literalsLaurence Warne2022-08-091-7/+15
| | | | | | | | | | | | | | | | | | | | * lisp/progmodes/python.el (python--string-bytes-literal-matcher): Go backward one char after a match so that consecutive escape codes are highlighted (python--not-raw-string-literal-start-regexp): Make regular expression more comprehensive, so multi-line bytes literals are not caught (python-rx): Accept one to three octal digits in octal escape codes instead of always three
* | Clean up some local variable sectionsStefan Kangas2022-08-081-5/+0
| | | | | | | | | | | | | | | | | | | | * lisp/filesets.el: * lisp/mh-e/mh-*.el: * lisp/progmodes/python.el (python): Don't set options that are already set in .dir-locals.el. * lisp/textmodes/ispell.el: Remove redundant local variables. * lisp/gnus/nnmaildir.el: Remove local variables that conflicts with Emacs defaults.
* | Fix blank/comment line handling in python-nav-beginning-of-blockkobarity2022-08-071-6/+6
| | | | | | | | | | * lisp/progmodes/python.el (python-nav-beginning-of-block): Fix handling of blank/comment line right after block start (bug#57038).
* | Fontify python escape sequences in literalslWarne2022-08-061-2/+54
| | | | | | | | | | | | | | | | | | | | * lisp/progmodes/python.el (python-rx): Add regular expressions matching escape codes in string and byte literals (python--string-bytes-literal-matcher): new function (python--not-raw-bytes-literal-start-regexp): new constant (python--not-raw-string-literal-start-regexp): new constant * test/lisp/progmodes/python-tests.el: Add tests for new fontification (bug#57004).
* | Fix comment/else indentation problem in python-modeStephen Berman2022-07-271-1/+2
| | | | | | | | | | | | * lisp/progmodes/python.el (python-info-dedenter-opening-block-positions): Fix indentation of "else" after a comment (bug#56742).
* | Fix Python navigation problem with a line continuation using backslashkobarity2022-07-231-2/+5
| | | | | | | | | | * lisp/progmodes/python.el (python-nav--beginning-of-defun): Fix line continuation using backslash in nested defun (bug#56615).
* | Fix python navigation problem with an empty line in nested defunkobarity2022-07-161-13/+16
| | | | | | | | | | * lisp/progmodes/python.el (python-nav--beginning-of-defun): Fix bug when point is on an empty line (bug#56600).
* | Remove many items obsolete since 24.1Stefan Kangas2022-07-081-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/allout.el (allout-abbreviate-flattened-numbering) (allout-mode-deactivate-hook): * lisp/ansi-color.el (ansi-color-unfontify-region): * lisp/auth-source.el (auth-source-hide-passwords) (auth-source-user-or-password) (auth-source-forget-user-or-password): * lisp/cedet/data-debug.el (data-debug-map): * lisp/cedet/semantic/grammar.el (semantic-grammar-syntax-table) (semantic-grammar-map): * lisp/chistory.el (command-history-map): * lisp/comint.el (comint-dynamic-complete) (comint-dynamic-complete-as-filename) (comint-dynamic-simple-complete): * lisp/dired-x.el (read-filename-at-point) (dired-x-submit-report): * lisp/dos-fns.el (register-name-alist, make-register) (register-value, set-register-value, intdos, mode25, mode4350): * lisp/emacs-lisp/bytecomp.el (byte-compile-disable-print-circle): * lisp/emacs-lisp/chart.el (chart-map): * lisp/emacs-lisp/package.el (package-menu-view-commentary): * lisp/emacs-lock.el (toggle-emacs-lock, emacs-lock-from-exiting): * lisp/erc/erc.el (erc-complete-word): * lisp/eshell/em-cmpl.el (eshell-cmpl-suffix-list): * lisp/eshell/esh-util.el (eshell-for): * lisp/files.el (inhibit-first-line-modes-regexps) (inhibit-first-line-modes-suffixes): * lisp/gnus/gnus-msg.el (gnus-outgoing-message-group) (gnus-debug-files, gnus-debug-exclude-variables): * lisp/gnus/gnus-registry.el (gnus-registry-user-format-function-M): * lisp/gnus/gnus.el (gnus-local-domain, gnus-carpal): * lisp/gnus/nnimap.el (nnimap-split-rule): * lisp/iimage.el (turn-on-iimage-mode): * lisp/image.el (image-extension-data, image-library-alist): * lisp/mail/emacsbug.el (report-emacs-bug-pretest-address): * lisp/mail/mail-utils.el (rmail-dont-reply-to): * lisp/mail/mailalias.el (mail-complete-function) (mail-completion-at-point-function): * lisp/mail/rmail.el (rmail-dont-reply-to-names) (rmail-default-dont-reply-to-names): * lisp/mail/sendmail.el (mail-mailer-swallows-blank-line) (mail-sent-via): * lisp/menu-bar.el (menu-bar-kill-ring-save): * lisp/minibuffer.el (completion-annotate-function) (minibuffer-local-filename-must-match-map): * lisp/msb.el (msb-after-load-hooks): * lisp/obsolete/eieio-compat.el (eieio-defmethod) (eieio-defgeneric): * lisp/obsolete/info-edit.el (Info-edit-map): * lisp/obsolete/starttls.el (starttls-any-program-available): * lisp/progmodes/cfengine.el (cfengine-mode-abbrevs): * lisp/progmodes/cwarn.el (turn-on-cwarn-mode): * lisp/progmodes/make-mode.el (makefile-complete): * lisp/progmodes/meta-mode.el (meta-complete-symbol) (meta-mode-map): * lisp/progmodes/pascal.el (pascal-toggle-completions) (pascal-last-completions, pascal-show-completions): * lisp/progmodes/prolog.el (prolog-char-quote-workaround): * lisp/progmodes/which-func.el (which-func-mode): [FUNCTION] * lisp/simple.el (count-lines-region, minibuffer-completing-symbol): * lisp/speedbar.el (speedbar-syntax-table, speedbar-key-map): * lisp/strokes.el (strokes-report-bug): * lisp/subr.el (condition-case-no-debug): * lisp/term/ns-win.el (ns-alternatives-map) (ns-store-cut-buffer-internal): * lisp/term/w32-win.el (w32-default-color-map): * lisp/term/x-win.el (x-cut-buffer-or-selection-value): * lisp/textmodes/bibtex.el (bibtex-complete) (bibtex-entry-field-alist): * lisp/textmodes/reftex-index.el (reftex-index-map) (reftex-index-phrases-map): * lisp/textmodes/reftex-sel.el (reftex-select-label-map) (reftex-select-bib-map): * lisp/textmodes/reftex-toc.el (reftex-toc-map): * lisp/textmodes/rst.el (rst-block-face, rst-external-face) (rst-definition-face, rst-directive-face, rst-comment-face) (rst-emphasis1-face, rst-emphasis2-face, rst-literal-face) (rst-reference-face): * lisp/vc/vc-hooks.el (vc-toggle-read-only): * lisp/view.el (view-return-to-alist) (view-return-to-alist-update): Remove many functions and variables obsolete since 24.1. * lisp/textmodes/bibtex.el (bibtex-entry-alist): Don't use above removed variable 'bibtex-entry-field-alist'. * lisp/cedet/data-debug.el (data-debug-edebug-expr) (data-debug-eval-expression): * lisp/emacs-lisp/trace.el (trace--read-args): * lisp/files-x.el (read-file-local-variable-value): * lisp/simple.el (read--expression): Don't use above removed variable 'minibuffer-completing-symbol'. * lisp/textmodes/rst.el (rst-font-lock-keywords): Don't use above removed variables. * src/w32fns.c (Fw32_default_color_map): Delete obsolete function. (syms_of_w32fns): Delete defsubr for above defun. * src/keyboard.c (syms_of_keyboard) <Vdeferred_action_list> <Vdeferred_action_function>: Delete DEFVARs. <Qdeferred_action_function>: Delete DEFSYM. (syms_of_keyboard_for_pdumper): Adjust for above change. (command_loop_1): Don't run deferred-action-function hook. * lisp/subr.el (deferred-action-list, deferred-action-function): Delete obsoletion statements. * lisp/emacs-lisp/ert-x.el (ert-simulate-command): Don't run 'deferred-action-list' hook. * doc/lispref/hooks.texi (Standard Hooks): Delete 'deferred-action-function'. * lisp/emacs-lisp/lisp.el (field-complete): * lisp/eshell/em-cmpl.el (eshell-cmpl-initialize): * lisp/gnus/gnus-msg.el (gnus-inews-insert-gcc): * lisp/gnus/nnmail.el (nnmail-fancy-expiry-target): * lisp/mail/mail-utils.el (mail-dont-reply-to): * lisp/mail/sendmail.el (sendmail-send-it): * lisp/mail/smtpmail.el (smtpmail-send-it): * lisp/minibuffer.el (minibuffer-completion-help): * lisp/progmodes/python.el: Don't use above removed items. * lisp/emacs-lisp/eieio-core.el: * lisp/mail/mailalias.el (mail-complete-alist): Doc fixes; don't refer to above removed items. ; * etc/NEWS: List removed items.
* | Quote some literal keys to get help-key-binding faceStefan Kangas2022-07-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/align.el (align): * lisp/bindings.el (undo-repeat-map): * lisp/calc/calc-embed.el (calc-do-embedded): * lisp/calc/calc-prog.el (calc-user-define-invocation): * lisp/calc/calc-yank.el (calc--edit-mode): * lisp/comint.el (comint-history-isearch) * lisp/dired.el (dired-mode): * lisp/emulation/viper.el (viper-mode): * lisp/erc/erc-button.el (erc-button-face): * lisp/erc/erc-track.el (erc-track-enable-keybindings): * lisp/gnus/gnus-art.el (gnus-article-button-face): * lisp/gnus/gnus-eform.el (gnus-edit-form): * lisp/gnus/gnus-sum.el (gnus-summary-stop-at-end-of-message) (gnus-summary-goto-unread): * lisp/icomplete.el (icomplete-show-matches-on-no-input): * lisp/image-mode.el (image-scroll-up): * lisp/international/iso-transl.el (iso-transl-set-language): * lisp/isearch.el (isearch-forward-regexp): * lisp/misc.el (butterfly): * lisp/outline.el (outline-minor-mode-cycle-filter) (outline-minor-mode-cycle): * lisp/progmodes/grep.el (rgrep): * lisp/progmodes/gud.el (gud-gdb-repeat-map, gud-sdb-repeat-map) (gud-dbx-repeat-map, gud-xdb-repeat-map, gud-perldb-repeat-map) (gud-pdb-repeat-map, gud-guiler-repeat-map, gud-jdb-repeat-map): * lisp/progmodes/idlw-shell.el (idlwave-shell-graphics-window-size) (idlwave-shell-mode): * lisp/progmodes/idlwave.el (idlwave-shell-debug-modifiers) (idlwave-list-shell-load-path-shadows): * lisp/progmodes/python.el (python-shell-get-process-or-error): * lisp/repeat.el (repeat-check-key): * lisp/replace.el (query-replace, query-replace-regexp) (read-regexp): * lisp/simple.el (read-extended-command-predicate): * lisp/tab-bar.el (tab-bar-switch-repeat-map) (tab-bar-move-repeat-map): * lisp/term.el (ansi-term): * lisp/textmodes/reftex-index.el (reftex-index-phrases-set-macro-key): * lisp/vc/emerge.el (emerge-scroll-left, emerge-scroll-right): * lisp/windmove.el: * lisp/winner.el (winner-mode): Quote literal keys to get 'help-key-binding' face. * lisp/comint.el (comint-insert-previous-argument): Use regular quotes.
* | Fix `python-nav-beginning-of-defun' line continuation using backslashkobarity2022-07-031-7/+18
| | | | | | | | | | | | | | * lisp/progmodes/python.el (python-nav--beginning-of-defun): Allow line continuation using backslash in defuns (bug#55702). (python-info-looking-at-beginning-of-defun): Add CHECK-STATEMENT argument.
* | lisp/progmodes/python.el (python-nav-end-of-block): prevent infinite loopTom Gillespie2022-06-291-2/+9
| | | | | | | | | | | | | | | | lisp/progmodes/python.el (python-nav-end-of-block): Fix a bad assumption that python-nav-end-of-statement always makes forward progress by testing that it actually does. If this check is not made then it is possible for python-nav-end-of-block to enter an infinite loop. (bug#56271)
* | Fix nested defuns handling in `python-nav-beginning-of-defun'kobarity2022-06-211-1/+7
| | | | | | | | | | * lisp/progmodes/python.el (python-nav--beginning-of-defun): Fix handling of nested defuns (bug#56105).
* | Fix Python Hideshow problem with backslash escaped newlineskobarity2022-05-281-2/+3
| | | | | | | | | | | | | | * lisp/progmodes/python.el (python-rx) (python-nav-beginning-of-defun-regexp): Allow python-nav-*-defun to handle backslash escaped newlines (bug#55690).
* | Don't font-lock invalid invalid class/function nameskobarity2022-05-221-2/+2
| | | | | | | | | | * lisp/progmodes/python.el (python-font-lock-keywords-level-1): Don't font-lock invalid invalid class/function names (bug#55573).
* | Fix two typos in comments in python.elkobarity2022-05-221-2/+2
| | | | | | | | | | | | * lisp/progmodes/python.el (python-font-lock-keywords-maximum-decoration): Fix typos in comments (bug#55557).
* | Properly indent Python PEP634 match/case blocksLele Gaifax2022-05-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Python 3.10 introduced the "structural pattern matching" syntax, and commit 139042eb8629e6fd49b2c3002a8fc4d1aabd174d told font-lock about the new keywords. This adds them also as block-start statements, to enable proper indentation of such blocks. * lisp/progmodes/python.el (python-rx): Add "match" and "case" as block-start keywords. * test/lisp/progmodes/python-tests.el (python-indent-after-match-block, python-indent-after-case-block): New tests to verify indentation of "match" and "case" blocks (bug#55572).
* | Fix recently introduced Python font lock breakage of chained assignmentskobarity2022-05-211-3/+6
| | | | | | | | | | * lisp/progmodes/python.el (python-font-lock-assignment-matcher): Fix fontification of chained assignments (bug#54992).