mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-01 09:51:22 -08:00
Merge from origin/emacs-26
11bd8aa24bFix flymake's loading of subr-xb500e06f4dFix Bug#28896d815de017bSkip a Flymake test for old gcc versionsfd3d8610b2Make :align-to account for display-line-numbers831eafc8aeAugment Flymake API for third-party extensionsddd547fadaImprove treatment of Fortran's "class default"234b1e3864Flymake backends must check proc obsoleteness in source bu...3ea6a4d4baSkip an rsync test in tramp-tests.el25f83fa7c5; Indentation fixes4d578d432dOn Windows default a frame's border width to zero (Bug#28873)6f1dea5c74Spelling fixesb8433b0954Use pop-to-buffer-same-window instead of switch-to-buffer2f7163fb72Fix the MSDOS build.2551d28fe8Fix line number display after 'widen'dc8812829bRemove resizable attribute on macOS undecorated frames (bu...b970a4a52aFix handling of `border-width' in `frameset--restore-frame...445e92658fMention how to send CC to > 1 address in a bug report8ca6fa585aImprove format-time-string doc2e1b3522b8Improve documentation of 'line-number-display-width'5b6e59cfdbImplement vc-default-dir-extra-headers for vc-rcs22adeca42aIn NEWS give advice on use of `switch-to-buffer' (Bug#28645)2c3e6f1ddcDont update primary selection with winner-undob38724ab67Work around ImageMagick bug 82520cc68e871Document rectangle-preview option more (Bug#27974)a0b7b301ddDo not reject https://gnu.org in commit messagesfb4200a875Fix Edebug spec for cl-defun (bug#24255)db68cefe72Fix errors in kmacro.el post-command-hookc63b344c3dFix range-error in image-dired.el081d2187c4Fix 'line-number-display-width' in hscrolled windows16e85456e7Fix error in tramp-smb-handle-insert-directory613db8d35cDon't reject PBM header whitespace unnecessarily3205b12a78Fix regression in display of PPM images1ca9ae7069Require subr-x when compiling nnimap.elde60992053Fix ert-test finding by symbol (Bug#28849)51615a8082Don't remember old debugger window (Bug#17882)5980de3727Disable python native completion on w32 (Bug#28580)616b4c5956Let select-frame-by-name choose any frame when called from...8eb3c01dbd* lisp/dired-aux.el (dired-create-directory): Doc fix.325dfdae13Avoid compilation warnings in optimized buildsf79382819c; * src/composite.c (Fclear_composition_cache): Fix last c...f95cd5cd70Improve customization of arabic-shaper-ZWNJ-handling.a7f154688dImprove customization type of 'mouse-drag-and-drop-region'864734d112; Prefer https: to http: in GNU URLs3c78960a47Encourage https: in commit messagesdef9715282; Cleanup of etc/NEWS4e59ecc646Fix wording in Elisp manual's child frames section (Bug#28...eda9f5018cAnother fix for C mode fontification of w32 source files05aadd8990Fix fontification of ALIGN_STACK functionsaa0c38f358Make sure thread stack is properly aligned on MS-Windowsd7038020aaDo not under-align pseudovectorsff33053012Fix indentation bug in multi-line CSS selectors8968be822e; * etc/NEWS: Grammar and spelling fixes716b84034dgnutls_mac_get_nonce_size has been added in gnutls 3.355e313f7be; * CONTRIBUTE: More suggestions for using US English.622c675648* CONTRIBUTE: Suggest American English. # Conflicts: # etc/NEWS # msdos/sed2v2.inp
This commit is contained in:
commit
3155cb1585
82 changed files with 1110 additions and 710 deletions
|
|
@ -1693,7 +1693,8 @@ current buffer state and calls REPORT-FN when done."
|
|||
(when (eq (process-status proc) 'exit)
|
||||
(unwind-protect
|
||||
(cond
|
||||
((not (eq proc elisp-flymake--byte-compile-process))
|
||||
((not (eq proc (with-current-buffer source-buffer
|
||||
elisp-flymake--byte-compile-process)))
|
||||
(flymake-log :warning "byte-compile process %s obsolete" proc))
|
||||
((zerop (process-exit-status proc))
|
||||
(elisp-flymake--byte-compile-done report-fn
|
||||
|
|
|
|||
|
|
@ -909,6 +909,8 @@ Can be overridden by the value of `font-lock-maximum-decoration'.")
|
|||
[ \t]*\\(\\(?:\\sw\\|\\s_\\)+\\)"
|
||||
"Regexp matching the definition of a derived type.")
|
||||
|
||||
;; Maybe this should include "class default", but the constant is no
|
||||
;; longer used.
|
||||
(defconst f90-typeis-re
|
||||
"\\_<\\(class\\|type\\)[ \t]*is[ \t]*("
|
||||
"Regexp matching a CLASS/TYPE IS statement.")
|
||||
|
|
@ -955,10 +957,14 @@ Used in the F90 entry in `hs-special-modes-alist'.")
|
|||
;; Avoid F2003 "type is" in "select type",
|
||||
;; and also variables of derived type "type (foo)".
|
||||
;; "type, foo" must be a block (?).
|
||||
;; And a partial effort to avoid "class default".
|
||||
"\\(?:type\\|class\\)[ \t,]\\("
|
||||
"[^i(!\n\"& \t]\\|" ; not-i(
|
||||
"[^id(!\n\"& \t]\\|" ; not-id(
|
||||
"i[^s!\n\"& \t]\\|" ; i not-s
|
||||
"is\\(?:\\sw\\|\\s_\\)\\)\\|"
|
||||
"d[^e!\n\"& \t]\\|" ; d not-e
|
||||
"de[^f!\n\"& \t]\\|" ; de not-f
|
||||
"def[^a!\n\"& \t]\\|" ; def not-a
|
||||
"\\(?:is\\|default\\)\\(?:\\sw\\|\\s_\\)\\)\\|"
|
||||
;; "abstract interface" is F2003; "submodule" is F2008.
|
||||
"program\\|\\(?:abstract[ \t]*\\)?interface\\|\\(?:sub\\)?module\\|"
|
||||
;; "enum", but not "enumerator".
|
||||
|
|
@ -1454,7 +1460,7 @@ if all else fails."
|
|||
(not (or (looking-at "end")
|
||||
(looking-at "\\(do\\|if\\|else\\(if\\|where\\)?\
|
||||
\\|select[ \t]*\\(case\\|type\\)\\|case\\|where\\|forall\\|\
|
||||
\\(?:class\\|type\\)[ \t]*is\\|\
|
||||
\\(?:class\\|type\\)[ \t]*is\\|class[ \t]*default\\|\
|
||||
block\\|critical\\|enum\\|associate\\)\\_>")
|
||||
(looking-at "\\(program\\|\\(?:sub\\)?module\\|\
|
||||
\\(?:abstract[ \t]*\\)?interface\\|block[ \t]*data\\)\\_>")
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
;; GNU General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
||||
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Commentary:
|
||||
;;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
;; GNU General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
||||
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Commentary:
|
||||
;;
|
||||
|
|
@ -48,7 +48,8 @@
|
|||
(require 'thingatpt) ; end-of-thing
|
||||
(require 'warnings) ; warning-numeric-level, display-warning
|
||||
(require 'compile) ; for some faces
|
||||
(require 'subr-x) ; when-let*, if-let*, hash-table-keys, hash-table-values
|
||||
;; when-let*, if-let*, hash-table-keys, hash-table-values:
|
||||
(eval-when-compile (require 'subr-x))
|
||||
|
||||
(defgroup flymake nil
|
||||
"Universal on-the-fly syntax checker."
|
||||
|
|
@ -228,6 +229,29 @@ TYPE is a key to `flymake-diagnostic-types-alist' and TEXT is a
|
|||
description of the problem detected in this region."
|
||||
(flymake--diag-make :buffer buffer :beg beg :end end :type type :text text))
|
||||
|
||||
;;;###autoload
|
||||
(defun flymake-diagnostics (&optional beg end)
|
||||
"Get Flymake diagnostics in region determined by BEG and END.
|
||||
|
||||
If neither BEG or END is supplied, use the whole buffer,
|
||||
otherwise if BEG is non-nil and END is nil, consider only
|
||||
diagnostics at BEG."
|
||||
(mapcar (lambda (ov) (overlay-get ov 'flymake-diagnostic))
|
||||
(flymake--overlays :beg beg :end end)))
|
||||
|
||||
(defmacro flymake--diag-accessor (public internal thing)
|
||||
"Make PUBLIC an alias for INTERNAL, add doc using THING."
|
||||
`(defsubst ,public (diag)
|
||||
,(format "Get Flymake diagnostic DIAG's %s." (symbol-name thing))
|
||||
(,internal diag)))
|
||||
|
||||
(flymake--diag-accessor flymake-diagnostic-buffer flymake--diag-buffer buffer)
|
||||
(flymake--diag-accessor flymake-diagnostic-text flymake--diag-text text)
|
||||
(flymake--diag-accessor flymake-diagnostic-type flymake--diag-type type)
|
||||
(flymake--diag-accessor flymake-diagnostic-beg flymake--diag-beg beg)
|
||||
(flymake--diag-accessor flymake-diagnostic-end flymake--diag-end end)
|
||||
(flymake--diag-accessor flymake-diagnostic-backend flymake--diag-backend backend)
|
||||
|
||||
(cl-defun flymake--overlays (&key beg end filter compare key)
|
||||
"Get flymake-related overlays.
|
||||
If BEG is non-nil and END is nil, consider only `overlays-at'
|
||||
|
|
@ -238,7 +262,7 @@ verify FILTER, a function, and sort them by COMPARE (using KEY)."
|
|||
(widen)
|
||||
(let ((ovs (cl-remove-if-not
|
||||
(lambda (ov)
|
||||
(and (overlay-get ov 'flymake)
|
||||
(and (overlay-get ov 'flymake-diagnostic)
|
||||
(or (not filter)
|
||||
(funcall filter ov))))
|
||||
(if (and beg (null end))
|
||||
|
|
@ -498,18 +522,15 @@ associated `flymake-category' return DEFAULT."
|
|||
(default-maybe 'help-echo
|
||||
(lambda (_window _ov pos)
|
||||
(mapconcat
|
||||
(lambda (ov)
|
||||
(overlay-get ov 'flymake-text))
|
||||
(flymake--overlays :beg pos)
|
||||
#'flymake--diag-text
|
||||
(flymake-diagnostics pos)
|
||||
"\n")))
|
||||
(default-maybe 'severity (warning-numeric-level :error))
|
||||
(default-maybe 'priority (+ 100 (overlay-get ov 'severity))))
|
||||
;; Some properties can't be overridden.
|
||||
;;
|
||||
(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)))
|
||||
(overlay-put ov 'flymake-diagnostic diagnostic)))
|
||||
|
||||
;; Nothing in Flymake uses this at all any more, so this is just for
|
||||
;; third-party compatibility.
|
||||
|
|
@ -600,7 +621,7 @@ not expected."
|
|||
(lambda (ov)
|
||||
(eq backend
|
||||
(flymake--diag-backend
|
||||
(overlay-get ov 'flymake--diagnostic))))))
|
||||
(overlay-get ov 'flymake-diagnostic))))))
|
||||
(mapc (lambda (diag)
|
||||
(flymake--highlight-line diag)
|
||||
(setf (flymake--diag-backend diag) backend))
|
||||
|
|
@ -899,7 +920,7 @@ applied."
|
|||
(lambda (ov)
|
||||
(let ((diag (overlay-get
|
||||
ov
|
||||
'flymake--diagnostic)))
|
||||
'flymake-diagnostic)))
|
||||
(and diag
|
||||
(or (not filter)
|
||||
(memq (flymake--diag-type diag)
|
||||
|
|
@ -1089,13 +1110,13 @@ applied."
|
|||
(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)
|
||||
(diag (plist-get id :diagnostic)))
|
||||
(with-current-buffer (flymake--diag-buffer diag)
|
||||
(with-selected-window
|
||||
(display-buffer (current-buffer) other-window)
|
||||
(goto-char (overlay-start overlay))
|
||||
(pulse-momentary-highlight-region (overlay-start overlay)
|
||||
(overlay-end overlay)
|
||||
(goto-char (flymake--diag-beg diag))
|
||||
(pulse-momentary-highlight-region (flymake--diag-beg diag)
|
||||
(flymake--diag-end diag)
|
||||
'highlight))
|
||||
(current-buffer))))
|
||||
|
||||
|
|
@ -1108,18 +1129,16 @@ POS can be a buffer position or a button"
|
|||
|
||||
(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)
|
||||
(cl-loop for diag in (flymake-diagnostics)
|
||||
for (line . col) =
|
||||
(save-excursion
|
||||
(goto-char (overlay-start ov))
|
||||
(goto-char (flymake--diag-beg diag))
|
||||
(cons (line-number-at-pos)
|
||||
(- (point)
|
||||
(line-beginning-position))))
|
||||
for type = (flymake--diag-type diag)
|
||||
collect
|
||||
(list (list :overlay ov
|
||||
(list (list :diagnostic diag
|
||||
:line line
|
||||
:severity (flymake--lookup-type-property
|
||||
type
|
||||
|
|
|
|||
|
|
@ -3304,8 +3304,9 @@ the full statement in the case of imports."
|
|||
(defcustom python-shell-completion-native-disabled-interpreters
|
||||
;; PyPy's readline cannot handle some escape sequences yet. Native
|
||||
;; completion was found to be non-functional for IPython (see
|
||||
;; Bug#25067).
|
||||
(list "pypy" "ipython")
|
||||
;; Bug#25067). Native completion doesn't work on w32 (Bug#28580).
|
||||
(if (eq system-type 'windows-nt) '("")
|
||||
'("pypy" "ipython"))
|
||||
"List of disabled interpreters.
|
||||
When a match is found, native completion is disabled."
|
||||
:version "25.1"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue