1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Merge from origin/emacs-26

05d0c0f802 ; * ChangeLog.3: ChangeLog fixes.
fbabae6b24 * ChangeLog.3: Update.
eab051991e Fix docstring style for 'functionp'
e8a7c41b4e Format shell commands in tramp.texi
0526aac4eb Unbreak the button in the Flymake diagnostics buffer again
c89f001de1 Add mode map to Flymake diagnostic button
f9cd8ee681 Tweak the Flymake diagnostics buffer again
0e83f5f279 Simplify Flymake diagnostics buffer UX
cf4a15b9b6 First stab at a Flymake diagnostics buffer
e4a1556392 * etc/NEWS (Flymake): Rewrite entry.
00adeb43e9 Improve the Flymake manual
44c6401733 ; * etc/NEWS: Clarify the description of "---" and "+++".
042b3cfbd2 Fix two Flymake bugs
3dfa2ca4dc Don't log "emergencies" in the Flymake legacy backend
1c2e188440 Add full documentation on new Flymake API
0f7f677f82 Fix some Flymake docstrings and messages
21e7075781 Make three new Flymake commands for debugging common problems
c9be9a3678 ; INSTALL.REPO: Add -d to "thorough cleaning" suggestion.
5d51403ceb ; Typo fixes, mostly repeated words
0d004ed01a ; Spelling fixes
0485aa76c9 ; * src/lread.c (syms_of_lread) <module-file-suffix>: Fix ...
ba7fb37d6a * admin/authors.el (authors-renamed-files-alist): addition.
14dca4a79a ; ChangeLog.3 fixes
f352d0257c Fix PWD check on DOS_NT
934f08f3de Fix unlikely overflows with wd length
6c2b1e89ef * lisp/gnus/message.el: Improve last commit
7ed7360855 Fix problems when editing raw undecoded message (Bug#28671)
aca5f0072b Avoid encoding errors in message.el
0c36663db5 Improve doc string and prompt of 'grep-read-files'
2da83c9d36 Avoid assertion violations when line numbers are displayed
5b81f65ad0 ; * lisp/emacs-lisp/rmc.el: Minor fix for copyright and li...
11b37b4a9f Be lazy when starting Flymake checks
36ed9a9ede Fix last change in frameset.el
62e5c119af Describe how window dividers can replicate vertical border...
e2150d994a Add line-number faces to the display-line-numbers group
89b0023044 Increase xterm click count only within double-click-fuzz
745aea2296 Change pause in fullscreen toggling for NS port (bug#28496)
1cd334cd47 Handle PARENTS properly in tramp-*-handle-make-directory
f1c73de47d ; Merge from Gnulib (comment changes only)
7c2c117c91 Improve test for unreachable dirs
2202952b83 * src/xsmfns.c (x_session_initialize): Fix memory leak.
a9b72976de Merge branch 'emacs-26' of git.sv.gnu.org:/srv/git/emacs i...
64baaff8c5 New option for handling ZWNJ in Arabic text rendering
c194fb61c6 Make python prettify symbols into a defvar (Bug#28713)
6dfc778d54 Fix fullscreen crash on macOS (bug#28496)
3db0dc2168 Fix crash when closing fullscreen frame on macOS (bug#28661)
bc80da5bd3 Support gio tool in Tramp
349e0eb5ff Fix flymake-goto-next-error when message has %-constructs
0fa353b504 * src/gnutls.c (syms_of_gnutls): Remove duplicated call to...
dc6ae15a8d Move the entry about 'format' into Incompatible Lisp Changes
75174a632d Fix glitches in displaying TTY menus
238fbcb20e Create new Edebug spec for docstrings and use it in closures
2d58d51329 Avoid byte-compilation warnings in message.el

# Conflicts:
#	etc/NEWS
This commit is contained in:
Paul Eggert 2017-10-12 13:44:16 -07:00
commit 3d0d5b4ebd
102 changed files with 1867 additions and 486 deletions

View file

@ -619,7 +619,7 @@ COUNT starts with 1. GEN-SEP is used to separate long variable values."
'((java-mode ("%sTokenTypes.java") ("%s.java"))
(c++-mode ("%sTokenTypes.hpp") ("%s.cpp" "%s.hpp")))
"Language dependent formats which specify generated files.
Each element in this list looks looks like
Each element in this list looks like
(MAJOR-MODE (VOCAB-FILE-FORMAT...) (CLASS-FILE-FORMAT...)).
The element whose MAJOR-MODE is equal to `antlr-language' is used to

View file

@ -167,7 +167,7 @@ use c-constant-symbol instead."
(defmacro defcustom-c-stylevar (name val doc &rest args)
"Define a style variable NAME with VAL and DOC.
More precisely, convert the given `:type FOO', mined out of ARGS,
to an aggregate `:type (radio STYLE (PREAMBLE FOO))', append some
to an aggregate `:type (radio STYLE (PREAMBLE FOO))', append
some boilerplate documentation to DOC, arrange for the fallback
value of NAME to be VAL, and call `custom-declare-variable' to
do the rest of the work.

View file

@ -480,7 +480,7 @@ Font for POD headers."
(defcustom cperl-highlight-variables-indiscriminately nil
"Non-nil means perform additional highlighting on variables.
Currently only changes how scalar variables are highlighted.
Note that that variable is only read at initialization time for
Note that the variable is only read at initialization time for
the variable `cperl-font-lock-keywords-2', so changing it after you've
entered CPerl mode the first time will have no effect."
:type 'boolean

View file

@ -626,7 +626,7 @@ Create parent directories as needed."
"Tell Flymake UI about a fatal PROBLEM with this backend.
May only be called in a dynamic environment where
`flymake-proc--report-fn' is bound."
(flymake-log 0 "%s: %s" problem explanation)
(flymake-log 1 "%s: %s" problem explanation)
(if (and (boundp 'flymake-proc--report-fn)
flymake-proc--report-fn)
(funcall flymake-proc--report-fn :panic
@ -766,7 +766,7 @@ can also be executed interactively independently of
(unwind-protect
(cond
((not cmd-and-args)
(flymake-log 0 "init function %s for %s failed, cleaning up"
(flymake-log 1 "init function %s for %s failed, cleaning up"
init-f buffer-file-name))
(t
(setq proc

View file

@ -123,10 +123,14 @@ If nil, never start checking buffer automatically like this."
(make-obsolete-variable 'flymake-gui-warnings-enabled
"it no longer has any effect." "26.1")
(defcustom flymake-start-syntax-check-on-find-file t
"Start syntax check on find file."
(defcustom flymake-start-on-flymake-mode t
"Start syntax check when `flymake-mode'is enabled.
Specifically, start it when the buffer is actually displayed."
:type 'boolean)
(define-obsolete-variable-alias 'flymake-start-syntax-check-on-find-file
'flymake-start-on-flymake-mode "26.1")
(defcustom flymake-log-level -1
"Obsolete and ignored variable."
:type 'integer)
@ -138,24 +142,25 @@ If nil, never start checking buffer automatically like this."
"If non-nil, moving to errors wraps around buffer boundaries."
:type 'boolean)
(define-fringe-bitmap 'flymake-double-exclamation-mark
(vector #b00000000
#b00000000
#b00000000
#b00000000
#b01100110
#b01100110
#b01100110
#b01100110
#b01100110
#b01100110
#b01100110
#b01100110
#b00000000
#b01100110
#b00000000
#b00000000
#b00000000))
(when (fboundp 'define-fringe-bitmap)
(define-fringe-bitmap 'flymake-double-exclamation-mark
(vector #b00000000
#b00000000
#b00000000
#b00000000
#b01100110
#b01100110
#b01100110
#b01100110
#b01100110
#b01100110
#b01100110
#b01100110
#b00000000
#b01100110
#b00000000
#b00000000
#b00000000)))
(defvar-local flymake-timer nil
"Timer for starting syntax check.")
@ -318,12 +323,12 @@ region is invalid."
(defvar flymake-diagnostic-functions nil
"Special hook of Flymake backends that check a buffer.
The functions in this hook diagnose problems in a buffers
The functions in this hook diagnose problems in a buffer's
contents and provide information to the Flymake user interface
about where and how to annotate problems diagnosed in a buffer.
Whenever Flymake or the user decides to re-check the buffer, each
function is called with an arbitrary number of arguments:
Each backend function must be prepared to accept an arbitrary
number of arguments:
* the first argument is always REPORT-FN, a callback function
detailed below;
@ -333,11 +338,12 @@ function is called with an arbitrary number of arguments:
no such arguments, but backend functions must be prepared to
accept and possibly ignore any number of them.
Backend functions are expected to initiate the buffer check, but
aren't required to complete it check before exiting: if the
computation involved is expensive, especially for large buffers,
that task can be scheduled for the future using asynchronous
processes or other asynchronous mechanisms.
Whenever Flymake or the user decides to re-check the buffer,
backend functions are called as detailed above and are expected
to initiate this check, but aren't required to complete it before
exiting: if the computation involved is expensive, especially for
large buffers, that task can be scheduled for the future using
asynchronous processes or other asynchronous mechanisms.
In any case, backend functions are expected to return quickly or
signal an error, in which case the backend is disabled. Flymake
@ -371,10 +377,10 @@ Currently accepted values for REPORT-ACTION are:
Currently accepted REPORT-KEY arguments are:
* :explanation: value should give user-readable details of
* `:explanation' value should give user-readable details of
the situation encountered, if any.
* :force: value should be a boolean suggesting that Flymake
* `:force': value should be a boolean suggesting that Flymake
consider the report even if it was somehow unexpected.")
(defvar flymake-diagnostic-types-alist
@ -403,12 +409,12 @@ properties are:
* `severity', a non-negative integer specifying the diagnostic's
severity. The higher, the more serious. If the overlay
priority `priority' is not specified, `severity' is used to set
property `priority' is not specified, `severity' is used to set
it and help sort overlapping overlays.
* `flymake-category', a symbol whose property list is considered
as a default for missing values of any other properties. This
is useful to backend authors when creating new diagnostic types
a default for missing values of any other properties. This is
useful to backend authors when creating new diagnostic types
that differ from an existing type by only a few properties.")
(put 'flymake-error 'face 'flymake-error)
@ -493,8 +499,7 @@ associated `flymake-category' return DEFAULT."
(lambda (_window _ov pos)
(mapconcat
(lambda (ov)
(let ((diag (overlay-get ov 'flymake--diagnostic)))
(flymake--diag-text diag)))
(overlay-get ov 'flymake-text))
(flymake--overlays :beg pos)
"\n")))
(default-maybe 'severity (warning-numeric-level :error))
@ -503,6 +508,7 @@ associated `flymake-category' return DEFAULT."
;;
(overlay-put ov 'evaporate t)
(overlay-put ov 'flymake t)
(overlay-put ov 'flymake-text (flymake--diag-text diagnostic))
(overlay-put ov 'flymake--diagnostic diagnostic)))
;; Nothing in Flymake uses this at all any more, so this is just for
@ -605,7 +611,12 @@ not expected."
(flymake-log :debug "backend %s reported %d diagnostics in %.2f second(s)"
backend
(length new-diags)
(- (float-time) flymake-check-start-time)))))))))
(- (float-time) flymake-check-start-time)))
(when (and (get-buffer (flymake--diagnostics-buffer-name))
(get-buffer-window (flymake--diagnostics-buffer-name))
(null (cl-set-difference (flymake-running-backends)
(flymake-reporting-backends))))
(flymake-show-diagnostics-buffer))))))))
(defun flymake-make-report-fn (backend &optional token)
"Make a suitable anonymous report function for BACKEND.
@ -618,24 +629,42 @@ different runs of the same backend."
(with-current-buffer buffer
(apply #'flymake--handle-report backend token args))))))
(defun flymake--collect (fn)
(defun flymake--collect (fn &optional message-prefix)
"Collect Flymake backends matching FN.
If MESSAGE-PREFIX, echo a message using that prefix"
(unless flymake--backend-state
(user-error "Flymake is not initialized"))
(let (retval)
(maphash (lambda (backend state)
(when (funcall fn state) (push backend retval)))
flymake--backend-state)
(when message-prefix
(message "%s%s"
message-prefix
(mapconcat (lambda (s) (format "%s" s))
retval ", ")))
retval))
(defun flymake-running-backends ()
"Compute running Flymake backends in current buffer."
(flymake--collect #'flymake--backend-state-running))
(interactive)
(flymake--collect #'flymake--backend-state-running
(and (called-interactively-p 'interactive)
"Running backends: ")))
(defun flymake-disabled-backends ()
"Compute disabled Flymake backends in current buffer."
(flymake--collect #'flymake--backend-state-disabled))
(interactive)
(flymake--collect #'flymake--backend-state-disabled
(and (called-interactively-p 'interactive)
"Disabled backends: ")))
(defun flymake-reporting-backends ()
"Compute reporting Flymake backends in current buffer."
(flymake--collect #'flymake--backend-state-reported-p))
(interactive)
(flymake--collect #'flymake--backend-state-reported-p
(and (called-interactively-p 'interactive)
"Reporting backends: ")))
(defun flymake--disable-backend (backend &optional explanation)
"Disable BACKEND because EXPLANATION.
@ -670,41 +699,101 @@ If it is running also stop it."
(flymake--disable-backend backend err)))))
(defun flymake-start (&optional deferred force)
"Start a syntax check.
Start it immediately, or after current command if DEFERRED is
non-nil. With optional FORCE run even disabled backends.
"Start a syntax check for the current buffer.
DEFERRED is a list of symbols designating conditions to wait for
before actually starting the check. If it is nil (the list is
empty), start it immediately, else defer the check to when those
conditions are met. Currently recognized conditions are
`post-command', for waiting until the current command is over,
`on-display', for waiting until the buffer is actually displayed
in a window. If DEFERRED is t, wait for all known conditions.
With optional FORCE run even disabled backends.
Interactively, with a prefix arg, FORCE is t."
(interactive (list nil current-prefix-arg))
(cl-labels
((start
()
(remove-hook 'post-command-hook #'start 'local)
(setq flymake-check-start-time (float-time))
(run-hook-wrapped
'flymake-diagnostic-functions
(lambda (backend)
(cond
((and (not force)
(flymake--with-backend-state backend state
(flymake--backend-state-disabled state)))
(flymake-log :debug "Backend %s is disabled, not starting"
backend))
(let ((deferred (if (eq t deferred)
'(post-command on-display)
deferred))
(buffer (current-buffer)))
(cl-labels
((start-post-command
()
(remove-hook 'post-command-hook #'start-post-command
nil)
(with-current-buffer buffer
(flymake-start (remove 'post-command deferred) force)))
(start-on-display
()
(remove-hook 'window-configuration-change-hook #'start-on-display
'local)
(flymake-start (remove 'on-display deferred) force)))
(cond ((and (memq 'post-command deferred)
this-command)
(add-hook 'post-command-hook
#'start-post-command
'append nil))
((and (memq 'on-display deferred)
(not (get-buffer-window (current-buffer))))
(add-hook 'window-configuration-change-hook
#'start-on-display
'append 'local))
(t
(flymake--run-backend backend)))
nil))))
(if (and deferred
this-command)
(add-hook 'post-command-hook #'start 'append 'local)
(start))))
(setq flymake-check-start-time (float-time))
(run-hook-wrapped
'flymake-diagnostic-functions
(lambda (backend)
(cond
((and (not force)
(flymake--with-backend-state backend state
(flymake--backend-state-disabled state)))
(flymake-log :debug "Backend %s is disabled, not starting"
backend))
(t
(flymake--run-backend backend)))
nil)))))))
(defvar flymake-mode-map
(let ((map (make-sparse-keymap))) map)
"Keymap for `flymake-mode'")
;;;###autoload
(define-minor-mode flymake-mode nil
:group 'flymake :lighter flymake--mode-line-format :keymap flymake-mode-map
(define-minor-mode flymake-mode
"Toggle Flymake mode on or off.
With a prefix argument ARG, enable Flymake mode if ARG is
positive, and disable it otherwise. If called from Lisp, enable
the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'.
Flymake is an Emacs minor mode for on-the-fly syntax checking.
Flymake collects diagnostic information from multiple sources,
called backends, and visually annotates the buffer with the
results.
Flymake performs these checks while the user is editing. The
customization variables `flymake-start-on-flymake-mode',
`flymake-no-changes-timeout' and
`flymake-start-syntax-check-on-newline' determine the exact
circumstances whereupon Flymake decides to initiate a check of
the buffer.
The commands `flymake-goto-next-error' and
`flymake-goto-prev-error' can be used to navigate among Flymake
diagnostics annotated in the buffer.
The visual appearance of each type of diagnostic can be changed
in the variable `flymake-diagnostic-types-alist'.
Activation or deactivation of backends used by Flymake in each
buffer happens via the special hook
`flymake-diagnostic-functions'.
Some backends may take longer than others to respond or complete,
and some may decide to disable themselves if they are not
suitable for the current buffer. The commands
`flymake-running-backends', `flymake-disabled-backends' and
`flymake-reporting-backends' summarize the situation, as does the
special *Flymake log* buffer." :group 'flymake :lighter
flymake--mode-line-format :keymap flymake-mode-map
(cond
;; Turning the mode ON.
(flymake-mode
@ -714,8 +803,7 @@ Interactively, with a prefix arg, FORCE is t."
(setq flymake--backend-state (make-hash-table))
(when flymake-start-syntax-check-on-find-file
(flymake-start)))
(when flymake-start-on-flymake-mode (flymake-start t)))
;; Turning the mode OFF.
(t
@ -748,7 +836,7 @@ Do it only if `flymake-no-changes-timeout' is non-nil."
(flymake-log
:debug "starting syntax check after idle for %s seconds"
flymake-no-changes-timeout)
(flymake-start))
(flymake-start t))
(setq flymake-timer nil))))
(current-buffer)))))
@ -770,13 +858,13 @@ Do it only if `flymake-no-changes-timeout' is non-nil."
(let((new-text (buffer-substring start stop)))
(when (and flymake-start-syntax-check-on-newline (equal new-text "\n"))
(flymake-log :debug "starting syntax check as new-line has been seen")
(flymake-start 'deferred))
(flymake-start t))
(flymake--schedule-timer-maybe)))
(defun flymake-after-save-hook ()
(when flymake-mode
(flymake-log :debug "starting syntax check as buffer was saved")
(flymake-start)))
(flymake-start t)))
(defun flymake-kill-buffer-hook ()
(when flymake-timer
@ -792,10 +880,10 @@ Do it only if `flymake-no-changes-timeout' is non-nil."
(defun flymake-goto-next-error (&optional n filter interactive)
"Go to Nth next Flymake error in buffer matching FILTER.
Interactively, always move to the next error. With a prefix arg,
skip any diagnostics with a severity less than :warning.
skip any diagnostics with a severity less than `:warning'.
If flymake-wrap-around is non-nil and no more next errors,
resumes search from top
If `flymake-wrap-around' is non-nil and no more next errors,
resumes search from top.
FILTER is a list of diagnostic types found in
`flymake-diagnostic-types-alist', or nil, if no filter is to be
@ -835,6 +923,7 @@ applied."
(goto-char (overlay-start target))
(when interactive
(message
"%s"
(funcall (overlay-get target 'help-echo)
nil nil (point)))))
(interactive
@ -846,9 +935,9 @@ applied."
(defun flymake-goto-prev-error (&optional n filter interactive)
"Go to Nth previous Flymake error in buffer matching FILTER.
Interactively, always move to the previous error. With a prefix
arg, skip any diagnostics with a severity less than :warning.
arg, skip any diagnostics with a severity less than `:warning'.
If flymake-wrap-around is non-nil and no more previous errors,
If `flymake-wrap-around' is non-nil and no more previous errors,
resumes search from bottom.
FILTER is a list of diagnostic types found in
@ -868,6 +957,7 @@ applied."
[ "Go to previous error" flymake-goto-prev-error t ]
[ "Check now" flymake-start t ]
[ "Go to log buffer" flymake-switch-to-log-buffer t ]
[ "Show error buffer" flymake-show-diagnostics-buffer t ]
"--"
[ "Turn off Flymake" flymake-mode t ]))
@ -897,11 +987,16 @@ applied."
,(concat (format "%s known backends\n" (length known))
(format "%s running\n" (length running))
(format "%s disabled\n" (length disabled))
"mouse-1: go to log buffer ")
"mouse-1: Display minor mode menu\n"
"mouse-2: Show help for minor mode")
keymap
,(let ((map (make-sparse-keymap)))
(define-key map [mode-line down-mouse-1]
flymake-menu)
(define-key map [mode-line mouse-2]
(lambda ()
(interactive)
(describe-function 'flymake-mode)))
map))
,@(pcase-let ((`(,ind ,face ,explain)
(cond ((null known)
@ -952,13 +1047,15 @@ applied."
,(let ((map (make-sparse-keymap))
(type type))
(define-key map [mode-line mouse-4]
(lambda (_event)
(lambda (event)
(interactive "e")
(flymake-goto-prev-error 1 (list type) t)))
(with-selected-window (posn-window (event-start event))
(flymake-goto-prev-error 1 (list type) t))))
(define-key map [mode-line mouse-5]
(lambda (_event)
(lambda (event)
(interactive "e")
(flymake-goto-next-error 1 (list type) t)))
(with-selected-window (posn-window (event-start event))
(flymake-goto-next-error 1 (list type) t))))
map)
help-echo
,(concat (format "%s diagnostics of type %s\n"
@ -976,6 +1073,102 @@ applied."
'(:propertize " "))
(:propertize "]")))))))
;;; Diagnostics buffer
(defvar-local flymake--diagnostics-buffer-source nil)
(defvar flymake-diagnostics-buffer-mode-map
(let ((map (make-sparse-keymap)))
(define-key map (kbd "RET") 'flymake-goto-diagnostic)
(define-key map (kbd "SPC") 'flymake-show-diagnostic)
map))
(defun flymake-show-diagnostic (pos &optional other-window)
"Show location of diagnostic at POS."
(interactive (list (point) t))
(let* ((id (or (tabulated-list-get-id pos)
(user-error "Nothing at point")))
(overlay (plist-get id :overlay)))
(with-current-buffer (overlay-buffer overlay)
(with-selected-window
(display-buffer (current-buffer) other-window)
(goto-char (overlay-start overlay))
(pulse-momentary-highlight-region (overlay-start overlay)
(overlay-end overlay)
'highlight))
(current-buffer))))
(defun flymake-goto-diagnostic (pos)
"Show location of diagnostic at POS.
POS can be a buffer position or a button"
(interactive "d")
(pop-to-buffer
(flymake-show-diagnostic (if (button-type pos) (button-start pos) pos))))
(defun flymake--diagnostics-buffer-entries ()
(with-current-buffer flymake--diagnostics-buffer-source
(cl-loop for ov in (flymake--overlays)
for diag = (overlay-get ov
'flymake--diagnostic)
for (line . col) =
(save-excursion
(goto-char (overlay-start ov))
(cons (line-number-at-pos)
(- (point)
(line-beginning-position))))
for type = (flymake--diag-type diag)
collect
(list (list :overlay ov
:line line
:severity (flymake--lookup-type-property
type
'severity (warning-numeric-level :error)))
`[,(format "%s" line)
,(format "%s" col)
,(propertize (format "%s" type)
'face (flymake--lookup-type-property
type 'mode-line-face 'flymake-error))
(,(format "%s" (flymake--diag-text diag))
mouse-face highlight
help-echo "mouse-2: visit this diagnostic"
face nil
action flymake-goto-diagnostic
mouse-action flymake-goto-diagnostic)]))))
(define-derived-mode flymake-diagnostics-buffer-mode tabulated-list-mode
"Flymake diagnostics"
"A mode for listing Flymake diagnostics."
(setq tabulated-list-format
`[("Line" 5 (lambda (l1 l2)
(< (plist-get (car l1) :line)
(plist-get (car l2) :line)))
:right-align t)
("Col" 3 nil :right-align t)
("Type" 8 (lambda (l1 l2)
(< (plist-get (car l1) :severity)
(plist-get (car l2) :severity))))
("Message" 0 t)])
(setq tabulated-list-entries
'flymake--diagnostics-buffer-entries)
(tabulated-list-init-header))
(defun flymake--diagnostics-buffer-name ()
(format "*Flymake diagnostics for %s*" (current-buffer)))
(defun flymake-show-diagnostics-buffer ()
"Show a list of Flymake diagnostics for current buffer."
(interactive)
(let* ((name (flymake--diagnostics-buffer-name))
(source (current-buffer))
(target (or (get-buffer name)
(with-current-buffer (get-buffer-create name)
(flymake-diagnostics-buffer-mode)
(setq flymake--diagnostics-buffer-source source)
(current-buffer)))))
(with-current-buffer target
(revert-buffer)
(display-buffer (current-buffer)))))
(provide 'flymake)
(require 'flymake-proc)

View file

@ -903,7 +903,8 @@ substitution string. Note dynamic scoping of variables.")
(read-regexp "Search for" 'grep-tag-default 'grep-regexp-history))
(defun grep-read-files (regexp)
"Read files arg for interactive grep."
"Read a file-name pattern arg for interactive grep.
The pattern can include shell wildcards."
(let* ((bn (or (buffer-file-name)
(replace-regexp-in-string "<[0-9]+>\\'" "" (buffer-name))))
(fn (and bn
@ -936,7 +937,7 @@ substitution string. Note dynamic scoping of variables.")
(car (car grep-files-aliases))))
(files (completing-read
(concat "Search for \"" regexp
"\" in files"
"\" in files matching wildcard"
(if default (concat " (default " default ")"))
": ")
'read-file-name-internal

View file

@ -640,10 +640,14 @@ The type returned can be `comment', `string' or `paren'."
((python-rx string-delimiter)
(0 (ignore (python-syntax-stringify))))))
(defconst python--prettify-symbols-alist
(defvar python-prettify-symbols-alist
'(("lambda" . )
("and" . ?∧)
("or" . ?)))
("or" . ?))
"Value for `prettify-symbols-alist' in `python-mode'.")
(define-obsolete-variable-alias 'python--prettify-symbols-alist
'python-prettify-symbols-alist "26.1")
(defsubst python-syntax-count-quotes (quote-char &optional point limit)
"Count number of quotes around point (max is 3).