summaryrefslogtreecommitdiff
path: root/test/lisp/progmodes/python-tests.el
Commit message (Collapse)AuthorAgeFilesLines
* Fix syntax check in python-info-looking-at-beginning-of-defunkobarity2022-09-231-0/+48
| | | | | | | | | * 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).
* Apply syntax highlighting for all python f-stringsLaurence Warne2022-09-061-4/+8
| | | | | | * 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 blocks support for hideshowkobarity2022-08-251-1/+196
| | | | | | | | | | | | | | | | | | | | * 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).
* Prefer pos-bol and pos-eol in testsStefan Kangas2022-08-211-30/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/calendar/todo-mode-tests.el (todo-test-toggle-item-header02, todo-test-edit-item-date-month) (todo-test-multiline-item-indentation-1) (todo-test-multiline-item-indentation-2) (todo-test-multiline-item-indentation-3): * test/lisp/cedet/semantic-utest-ia.el (semantic-ia-utest-buffer) (semantic-sr-utest-buffer-refs): * test/lisp/cedet/semantic-utest.el (semantic-utest-kill-indicator) (semantic-utest-unkill-indicator): * test/lisp/dired-tests.el (dired-test-bug27968): * test/lisp/emacs-lisp/backtrace-tests.el (backtrace-tests--verify-single-and-multi-line): * test/lisp/emacs-lisp/find-func-tests.el (find-func-tests--find-library-verbose): * test/lisp/erc/erc-tests.el (erc-ring-previous-command) (erc-log-irc-protocol): * test/lisp/gnus/message-tests.el (message-mode-propertize): * test/lisp/info-xref-tests.el (info-xref-test-emacs-manuals): * test/lisp/mail/footnote-tests.el (footnote-tests-same-place): * test/lisp/progmodes/elisp-mode-tests.el (elisp-shorthand-completion-at-point): * test/lisp/progmodes/f90-tests.el (f90-test-bug38415): * test/lisp/progmodes/python-tests.el (python-indent-electric-comma-inside-multiline-string) (python-indent-electric-comma-after-multiline-string) (python-indent-electric-colon-1, python-indent-electric-colon-2) (python-indent-electric-colon-3, python-indent-electric-colon-4) (python-mark-defun-2, python-mark-defun-3, python-mark-defun-4) (python-mark-defun-5, python-nav-end-of-defun-2) (python-nav-end-of-statement-1, python-nav-end-of-block-1) (python-indent-dedent-line-backspace-2) (python-indent-dedent-line-backspace-3) (python-eldoc--get-symbol-at-point-1) (python-info-beginning-of-statement-p-1) (python-info-beginning-of-statement-p-2): * test/lisp/replace-tests.el (replace-occur-revert-bug32543) (replace-occur-revert-bug32987): * test/lisp/simple-tests.el (simple-delete-indentation-boundaries) (simple-delete-indentation-region) (line-number-at-pos-in-narrow-buffer) (line-number-at-pos-keeps-restriction): * test/lisp/textmodes/css-mode-tests.el (css-mode-test-selectors) (scss-mode-test-selectors): * test/lisp/textmodes/fill-tests.el (fill-test-unbreakable-paragraph) (fill-test-breakable-paragraph): * test/lisp/time-stamp-tests.el (time-stamp-custom-pattern): * test/src/lread-tests.el (lread-tests--last-message): * test/src/process-tests.el (set-process-filter-t): * test/src/undo-tests.el (undo-test-skip-invalidated-markers): Prefer pos-bol and pos-eol.
* python.el: Adjustments to Flymake backendAugusto Stoffel2022-08-191-0/+34
| | | | | | | * 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)
* Fix Python indentation of block continuationkobarity2022-08-181-0/+19
| | | | | | | | * 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-0/+113
| | | | | | | | | | | | | | | | * 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-196/+1
| | | | | | This reverts commit af4cfb519415ed3c1d6d036aac908e4f9ee383eb. This led to test failures.
* Add Python blocks support for hideshowkobarity2022-08-171-1/+196
| | | | | | | | | | | | | | | | | | | | * 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-0/+16
| | | | | * 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-8/+87
| | | | | | | | | | * 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
* Remove redundant local variables in testsStefan Kangas2022-08-081-4/+0
| | | | | | | | * test/lisp/calc/calc-tests.el: * test/lisp/progmodes/python-tests.el: Remove redundant local variables. * test/src/coding-tests.el: Pacify byte-compiler without using local variable.
* Fix blank/comment line handling in python-nav-beginning-of-blockkobarity2022-08-071-0/+22
| | | | | * 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-0/+77
| | | | | | | | | | * 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).
* Add a test for python-mode comment/else problemLars Ingebrigtsen2022-07-271-0/+29
| | | | Based on a patch from kobarity <kobarity@gmail.com>
* Fix Python navigation problem with a line continuation using backslashkobarity2022-07-231-0/+26
| | | | | * 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-2/+32
| | | | | * lisp/progmodes/python.el (python-nav--beginning-of-defun): Fix bug when point is on an empty line (bug#56600).
* ; Fix typosStefan Kangas2022-07-141-1/+1
|
* Fix `python-nav-beginning-of-defun' line continuation using backslashkobarity2022-07-031-2/+79
| | | | | | | * 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.
* test/lisp/progmodes/python-tests.el: add test for nav end of blockTom Gillespie2022-06-291-0/+12
| | | | Add test for python-nav-end-of-block to prevent regression of bug#56271.
* Fix nested defuns handling in `python-nav-beginning-of-defun'kobarity2022-06-211-2/+43
| | | | | * 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-0/+54
| | | | | | | * 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-0/+12
| | | | | * lisp/progmodes/python.el (python-font-lock-keywords-level-1): Don't font-lock invalid invalid class/function names (bug#55573).
* Properly indent Python PEP634 match/case blocksLele Gaifax2022-05-221-0/+25
| | | | | | | | | | | | | 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-0/+7
| | | | | * lisp/progmodes/python.el (python-font-lock-assignment-matcher): Fix fontification of chained assignments (bug#54992).
* Fix Python highlighting of some assignment statementskobarity2022-05-161-0/+160
| | | | | * lisp/progmodes/python.el (python-rx): Limit not-simple-operator to a single line (bug#51362).
* Make Python evaluation work more reliablyJin Choi2022-04-301-15/+3
| | | | | | | * lisp/progmodes/python.el (python-shell-buffer-substring): Make more regions valid Python code (bug#55174). Copyright-paperwork-exempt: yes
* python.el: Try and better split the Tramp codeStefan Monnier2022-02-041-26/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Merge from origin/emacs-28Eli Zaretskii2022-01-011-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year. 86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year ebe8772f65 ; Minor fixes related to copyright years 23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye... 8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t. 19dcb237b5 ; Add 2022 to copyright years. # Conflicts: # etc/NEWS # etc/refcards/ru-refcard.tex # lib/cdefs.h # lisp/erc/erc-dcc.el # lisp/erc/erc-imenu.el # lisp/erc/erc-replace.el # lisp/image-dired.el # lisp/progmodes/xref.el # m4/alloca.m4 # m4/byteswap.m4 # m4/errno_h.m4 # m4/getopt.m4 # m4/gnulib-common.m4 # m4/inttypes.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/sys_socket_h.m4
| * ; Add 2022 to copyright years.Eli Zaretskii2022-01-011-1/+1
| |
* | Merge from origin/emacs-28Stefan Kangas2021-12-131-6/+12
|\| | | | | | | | | | | | | | | 9bd3f78645 Make `M-x run-python' select the window again 62139aeb42 * lisp/tab-bar.el (tab-bar-switch-to-last-tab): Add 'abs' ... ea8422204f * make-dist (manifest): Filter out msdos/autogen/* files. b5354e989d Rewrite the "Quitting Windows" section of Emacs Lisp Refer... 64ea1a178c Fix eshell for systems that do not have subprocesses
| * Make `M-x run-python' select the window againKévin Le Gouguec2021-12-131-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Interactively, we want M-x run-python to focus the interpreter buffer. The previous code failed in two ways: - the call to 'display-buffer' was not reached if an interpreter was already running, - set-buffer is ineffectual if the interpreter's window is not selected: once Emacs returns to the command loop, the current buffer will revert back to what the selected window contains. * lisp/progmodes/python.el (python-shell-make-comint): Handle the SHOW argument regardless of whether an interpreter buffer exists, and use pop-to-buffer to select the window. (run-python): Delegate buffer management to 'python-shell-make-comint'. * test/lisp/progmodes/python-tests.el (python-tests--run-python-selects-window): Rename from 'python-tests--bug31398', and adjust assertions (bug#52380).
* | Prefer ert-with-temp-(directory|file)Stefan Kangas2021-11-071-11/+12
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/abbrev-tests.el (read-write-abbrev-file-test) (read-write-abbrev-file-test-with-props) (abbrev-edit-save-to-file-test): * test/lisp/auth-source-tests.el (auth-source-test-netrc-create-secret) (auth-source-delete): * test/lisp/autoinsert-tests.el (autoinsert-tests-auto-insert-file): * test/lisp/bookmark-tests.el (with-bookmark-test-save-load): * test/lisp/buff-menu-tests.el (buff-menu-24962): * test/lisp/calendar/icalendar-tests.el (icalendar-tests--do-test-export): * test/lisp/calendar/todo-mode-tests.el (with-todo-test): * test/lisp/dired-tests.el (dired-test-bug27243-01, dired-test-bug27243-02) (dired-test-bug27243-03, dired-test-bug27631) (dired-test-bug27968, dired-test-with-temp-dirs): * test/lisp/dired-x-tests.el (dired-test-bug25942): * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--with-temp-file): * test/lisp/emacs-lisp/check-declare-tests.el (check-declare-tests-scan) (check-declare-tests-verify-mismatch): * test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-with-normal-env): * test/lisp/emacs-lisp/package-tests.el (with-package-test) (package-test-signed): * test/lisp/emacs-lisp/testcover-tests.el (testcover-tests-markup-region) (testcover-tests-run-test-case): * test/lisp/emulation/viper-tests.el (viper-test-undo-kmacro): * test/lisp/epg-tests.el (with-epg-tests): * test/lisp/eshell/em-hist-tests.el (eshell-write-readonly-history): * test/lisp/eshell/em-ls-tests.el (em-ls-test-bug27631): * test/lisp/ffap-tests.el (ffap-tests-25243): * test/lisp/files-tests.el (files-tests-bug-18141) (files-tests-read-file-in-~, files-tests-make-directory) (files-tests-copy-directory, files-tests-executable-find) (files-tests-dont-rewrite-precious-files) (files-tests--save-some-buffers): * test/lisp/ls-lisp-tests.el (ls-lisp-test-bug27631): * test/lisp/mail/uudecode-tests.el (uudecode-tests-decode-region-internal) (uudecode-tests-decode-region-external): * test/lisp/net/browse-url-tests.el (browse-url-tests-delete-temp-file): * test/lisp/progmodes/elisp-mode-tests.el (xref--case-insensitive): * test/lisp/progmodes/etags-tests.el (etags-buffer-local-tags-table-list): * test/lisp/progmodes/flymake-tests.el (ruby-backend): * test/lisp/progmodes/python-tests.el (python-tests-with-temp-file): * test/lisp/progmodes/sql-tests.el (with-sql-test-connect-harness): * test/lisp/saveplace-tests.el (saveplace-test-save-place-to-alist/file) (saveplace-test-forget-unreadable-files) (saveplace-test-place-alist-to-file): * test/lisp/so-long-tests/spelling-tests.el: * test/lisp/textmodes/reftex-tests.el (reftex-locate-bibliography-files) (reftex-parse-from-file-test): * test/lisp/thumbs-tests.el (thumbs-tests-thumbsdir/create-if-missing): * test/lisp/vc/vc-bzr-tests.el (vc-bzr-test-bug9726) (vc-bzr-test-bug9781, vc-bzr-test-faulty-bzr-autoloads): * test/lisp/vc/diff-mode-tests.el (diff-mode-test-ignore-trailing-dashes): * test/lisp/vc/ediff-ptch-tests.el (ediff-ptch-test-bug26084): * test/lisp/wdired-tests.el (wdired-test-bug32173-01) (wdired-test-bug32173-02, wdired-test-symlink-name) (wdired-test-unfinished-edit-01, wdired-test-bug34915) (wdired-test-bug39280): * test/src/buffer-tests.el (test-kill-buffer-auto-save-default): * test/src/filelock-tests.el (filelock-tests--fixture): * test/src/inotify-tests.el (inotify-file-watch-simple): * test/src/undo-tests.el (undo-test-file-modified): Prefer 'ert-with-temp-(directory|file)' to using 'make-temp-file' directly. In some cases, this is just cleanup, but in several cases this fixes bugs where an error would have lead to us not cleaning up.
* Make syntax-ppss more accurate for Python triple quotes (bug#49518)João Távora2021-09-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | By putting delimiter syntax on the last character of Python triple-quoted strings, this makes syntax-ppss be more accurate. Previously: emacs -Q something.py type two single quotes M-: (nth 3 (syntax-ppss)) notice how the return value says you're outside a string, correctly type another quote M-: (nth 3 (syntax-ppss)) notice how the return value says you're inside a string, correctly backspace the quote just entered M-: (nth 3 (syntax-ppss)) notice how the return value says you're inside a string, incorrectly With this patch the last step is corrected. This helps things like electric-pair-mode. Also, the test python-syntax-after-python-backspace now passes, again. * lisp/progmodes/python.el (python-syntax-stringify): Put delimiter syntax in "inner" of the surrouding triple quotes. * test/lisp/progmodes/python-tests.el (python-syntax-after-python-backspace): Passes again.
* Expand and improve electric-pair-mode and Python testing (bug#49518)João Távora2021-09-211-1/+28
| | | | | | | | | | | | | | | | | | In python-tests.el, the triple-quote pairing tests are passing incorrectly, i.e. the auto-pairing functionality they purport to guard isn't really working for users trying it interactively. Added a new failing test, soon to be fixed. In electric-tests.el, added tests for Python, too. * test/lisp/electric-tests.el (define-electric-pair-test): Also run main tests for python-mode. (pair-some-quotes-skip-others): Test another slightly different pairing. * test/lisp/progmodes/python-tests.el (python-triple-double-quote-pairing): Rename from python-triple-quote-pairing. (python-triple-single-quote-pairing): New test.
* Fix filling of overlong first lines in Python doc stringsDeneb Meketa2021-05-271-0/+24
| | | | | | | * lisp/progmodes/python.el (python-fill-string): Fill overlong first lines correctly (bug#20860). Copyright-paperwork-exempt: yes
* Update copyright year to 2021Paul Eggert2021-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright".
* Revert "Adjust python tests after fix for bug#39398"Lars Ingebrigtsen2020-10-301-3/+3
| | | | | | This reverts commit c6fb23873a594b6a4fc57fa107869a2e82159d07. The code is tweaked to be more backwards-compatible.
* Adjust python tests after fix for bug#39398Lars Ingebrigtsen2020-10-281-3/+3
|
* ; Prefer https to http in more URLsStefan Kangas2020-10-241-1/+1
| | | | These were all tested and confirmed working.
* ; Fix more typosStefan Kangas2020-10-031-2/+2
|
* Merge from origin/emacs-27Glenn Morris2020-07-111-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | c04b92104c Add commentary in gtkutil.c 6290850dac Consistently stylize eldoc as ElDoc in prose 136e931189 Improve documentation of "C-u C-x =" 1f52771fd3 Mention floating rounding issues c892ae65b4 Repair global-auto-revert-ignore-modes (bug#42271) 3a446a02fb ; * src/xdisp.c (decode_mode_spec): Fix commentary. 79f381b4a6 One more improvement of left/right-fringe display spec docs 1279bdb072 Another clarification of left/right-fringe display spec # Conflicts: # doc/emacs/programs.texi
| * Consistently stylize eldoc as ElDoc in proseBasil L. Contovounesios2020-07-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * doc/emacs/custom.texi (Specifying File Variables): * doc/emacs/modes.texi (Major Modes): * doc/emacs/programs.texi (Lisp Doc): * etc/NEWS.22: * etc/NEWS.23: * lisp/progmodes/python.el: (python-eldoc-function): * test/lisp/progmodes/python-tests.el: Consistently capitalize eldoc as ElDoc rather than Eldoc.
* | Use lexical-binding in most progmodes testsStefan Kangas2020-04-281-6/+5
|/ | | | | | | | | | | | | | | * test/lisp/progmodes/etags-tests.el: * test/lisp/progmodes/f90-tests.el: * test/lisp/progmodes/ps-mode-tests.el: * test/lisp/progmodes/python-tests.el: * test/lisp/progmodes/ruby-mode-tests.el: * test/lisp/progmodes/subword-tests.el: * test/lisp/progmodes/tcl-tests.el: * test/lisp/progmodes/xref-tests.el: Use lexical-binding. * test/lisp/progmodes/python-tests.el (python-tests-visible-string) (python-tests-look-at-1, python-tests-look-at-2) (python-shell-calculate-process-environment-2): Silence byte-compiler.
* Update copyright year to 2020Paul Eggert2020-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* Fix fill-paragraph in python docstrings (Bug#36056)Noam Postavsky2019-09-121-1/+12
| | | | | | | | | | * lisp/progmodes/python.el (python-do-auto-fill): New function. (python-mode): Set it as normal-auto-fill-function, and don't set fill-indent-according-to-mode. Having the latter set during fill-paragraph gives wrongs result, because python-indent-line doesn't remove indentation added by filling. * test/lisp/progmodes/python-tests.el (python-fill-docstring): New test.
* Merge from emacs-26Noam Postavsky2019-06-251-5/+15
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | e62ad04963 Fix sgml-mode handling of quotes within parens (Bug#36347) 06b35b2f92 ; * lisp/frame.el: Enhance add-variable-watcher commentary. 572e34bb6f Rename 'make-symbolic-link' argument NEWNAME to LINKNAME 04477adedc Check that length of data returned by sysctl is non-zero 81535eeadb * test/lisp/progmodes/python-tests.el (python-virt-bin): D... 9d48979ca8 Fix Python tests depending on system-type fcf6cc3177 Fix problem with wdired test when symlinks cannot be created. 4701e0663e Improve wording of documentation of click events # Conflicts: # lisp/textmodes/sgml-mode.el # test/lisp/textmodes/sgml-mode-tests.el
| * * test/lisp/progmodes/python-tests.el (python-virt-bin): Doc fix.Juanma Barranquero2019-06-171-1/+1
| |
| * Fix Python tests depending on system-typeJuanma Barranquero2019-06-171-5/+15
| | | | | | | | | | | | | | | | | | * test/lisp/progmodes/python-tests.el (python-virt-bin): New function. (python-shell-calculate-exec-path-2) (python-shell-calculate-exec-path-3) (python-shell-calculate-exec-path-4) (python-shell-with-environment-1, python-shell-with-environment-2): Use it.
* | Fix python docstring auto-fill (Bug#36056)Noam Postavsky2019-06-221-0/+18
| | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/python.el (python-mode): Set fill-indent-according-to-mode locally to t. This lets auto-fill do the right thing when auto-filling inside a docstring. The default was to nil on 2001-11-25 "(fill-indent-according-to-mode): Default to nil" with the comment that it "screws up CC-mode's filling tricks". But presumably it shouldn't be a problem for python-mode. * test/lisp/progmodes/python-tests.el (python-auto-fill-docstring): New test.