diff options
| author | kobarity | 2024-01-06 22:04:42 +0900 |
|---|---|---|
| committer | Eli Zaretskii | 2024-01-13 11:33:19 +0200 |
| commit | f2cc8ee2a1a106f9045447a1a025572d7938647e (patch) | |
| tree | a424109d2f98a5ce2dc2ec3038409ff8979b315c /lisp/progmodes/python.el | |
| parent | 893829021bd50604b035c058814f280c7386aa46 (diff) | |
| download | emacs-f2cc8ee2a1a106f9045447a1a025572d7938647e.tar.gz emacs-f2cc8ee2a1a106f9045447a1a025572d7938647e.zip | |
Fix 'python-info-docstring-p' bug in the 2nd line of a buffer
* lisp/progmodes/python.el (python-info-docstring-p): Add
'looking-at-p' check when bobp.
* test/lisp/progmodes/python-tests.el (python-font-lock-operator-1)
(python-font-lock-operator-2): Restoration of ERTs deleted by
mistake.
(python-font-lock-escape-sequence-bytes-newline)
(python-font-lock-escape-sequence-hex-octal)
(python-font-lock-escape-sequence-unicode)
(python-font-lock-raw-escape-sequence): Change 'font-lock-doc-face'
to 'font-lock-string-face' and remove :expected-result :failed.
(python-info-docstring-p-8): New test. (Bug#68284)
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 1148da11a06..a44d4215d7c 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -6260,7 +6260,9 @@ point's current `syntax-ppss'." | |||
| 6260 | counter))) | 6260 | counter))) |
| 6261 | (python-util-forward-comment -1) | 6261 | (python-util-forward-comment -1) |
| 6262 | (python-nav-beginning-of-statement) | 6262 | (python-nav-beginning-of-statement) |
| 6263 | (cond ((bobp)) | 6263 | (cond ((and (bobp) (save-excursion |
| 6264 | (python-util-forward-comment) | ||
| 6265 | (looking-at-p re)))) | ||
| 6264 | ((python-info-assignment-statement-p) t) | 6266 | ((python-info-assignment-statement-p) t) |
| 6265 | ((python-info-looking-at-beginning-of-defun)) | 6267 | ((python-info-looking-at-beginning-of-defun)) |
| 6266 | (t nil)))))) | 6268 | (t nil)))))) |