Merge emacs-26
This commit is contained in:
commit
11f9cb522f
63 changed files with 31479 additions and 2206 deletions
|
@ -1183,7 +1183,29 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'."
|
|||
(compilation-forget-errors)
|
||||
pt))))
|
||||
|
||||
(defvar byte-compile-log-warning-function
|
||||
#'byte-compile--log-warning-for-byte-compile
|
||||
"Function called when encountering a warning or error.
|
||||
Called with arguments (STRING POSITION FILL LEVEL). STRING is a
|
||||
message describing the problem. POSITION is a buffer position
|
||||
where the problem was detected. FILL is a prefix as in
|
||||
`warning-fill-prefix'. LEVEL is the level of the
|
||||
problem (`:warning' or `:error'). POSITION, FILL and LEVEL may be
|
||||
nil.")
|
||||
|
||||
(defun byte-compile-log-warning (string &optional fill level)
|
||||
"Log a byte-compilation warning.
|
||||
STRING, FILL and LEVEL are as described in
|
||||
`byte-compile-log-warning-function', which see."
|
||||
(funcall byte-compile-log-warning-function
|
||||
string byte-compile-last-position
|
||||
fill
|
||||
level))
|
||||
|
||||
(defun byte-compile--log-warning-for-byte-compile (string &optional
|
||||
_position
|
||||
fill
|
||||
level)
|
||||
"Log a message STRING in `byte-compile-log-buffer'.
|
||||
Also log the current function and file if not already done. If
|
||||
FILL is non-nil, set `warning-fill-prefix' to four spaces. LEVEL
|
||||
|
|
|
@ -1147,14 +1147,27 @@ Prefix argument is the same as for `checkdoc-defun'"
|
|||
;; features and behaviors, so we need some ways of specifying
|
||||
;; them, and making them easier to use in the wacked-out interfaces
|
||||
;; people are requesting
|
||||
(defun checkdoc-create-error (text start end &optional unfixable)
|
||||
"Used to create the return error text returned from all engines.
|
||||
(defvar checkdoc-create-error-function #'checkdoc--create-error-for-checkdoc
|
||||
"Function called when Checkdoc encounters an error.
|
||||
Should accept as arguments (TEXT START END &optional UNFIXABLE).
|
||||
|
||||
TEXT is the descriptive text of the error. START and END define the region
|
||||
it is sensible to highlight when describing the problem.
|
||||
Optional argument UNFIXABLE means that the error has no auto-fix available.
|
||||
|
||||
A list of the form (TEXT START END UNFIXABLE) is returned if we are not
|
||||
generating a buffered list of errors."
|
||||
generating a buffered list of errors.")
|
||||
|
||||
(defun checkdoc-create-error (text start end &optional unfixable)
|
||||
"Used to create the return error text returned from all engines.
|
||||
TEXT, START, END and UNFIXABLE conform to
|
||||
`checkdoc-create-error-function', which see."
|
||||
(funcall checkdoc-create-error-function text start end unfixable))
|
||||
|
||||
(defun checkdoc--create-error-for-checkdoc (text start end &optional unfixable)
|
||||
"Create an error for Checkdoc.
|
||||
TEXT, START, END and UNFIXABLE conform to
|
||||
`checkdoc-create-error-function', which see."
|
||||
(if checkdoc-generate-compile-warnings-flag
|
||||
(progn (checkdoc-error start text)
|
||||
nil)
|
||||
|
|
|
@ -268,7 +268,7 @@ into a button whose action shows the function's disassembly.")
|
|||
Output is further controlled by the variables
|
||||
`cl-print-readably', `cl-print-compiled', along with output
|
||||
variables for the standard printing functions. See Info
|
||||
node `(elisp)Output Variables'. "
|
||||
node `(elisp)Output Variables'."
|
||||
(cond
|
||||
(cl-print-readably (prin1 object stream))
|
||||
((not print-circle) (cl-print-object object stream))
|
||||
|
|
|
@ -142,8 +142,7 @@ the CPS state machinery.
|
|||
`(let ((,dynamic-var ,static-var))
|
||||
(unwind-protect ; Update the static shadow after evaluation is done
|
||||
,form
|
||||
(setf ,static-var ,dynamic-var))
|
||||
,form)))
|
||||
(setf ,static-var ,dynamic-var)))))
|
||||
|
||||
(defmacro cps--with-dynamic-binding (dynamic-var static-var &rest body)
|
||||
"Evaluate BODY such that generated atomic evaluations run with
|
||||
|
|
|
@ -329,6 +329,8 @@ Check the current row, the previous one and the next row."
|
|||
(string-width (if (stringp nt) nt (car nt)))))
|
||||
tabulated-list--near-rows)))
|
||||
|
||||
(defvar tabulated-list-entry-lnum-width nil)
|
||||
|
||||
(defun tabulated-list-print (&optional remember-pos update)
|
||||
"Populate the current Tabulated List mode buffer.
|
||||
This sorts the `tabulated-list-entries' list if sorting is
|
||||
|
@ -371,6 +373,7 @@ changing `tabulated-list-sort-key'."
|
|||
(unless tabulated-list-use-header-line
|
||||
(tabulated-list-print-fake-header)))
|
||||
;; Finally, print the resulting list.
|
||||
(setq tabulated-list-entry-lnum-width (tabulated-list-line-number-width))
|
||||
(while entries
|
||||
(let* ((elt (car entries))
|
||||
(tabulated-list--near-rows
|
||||
|
@ -383,7 +386,7 @@ changing `tabulated-list-sort-key'."
|
|||
(equal entry-id id)
|
||||
(setq entry-id nil
|
||||
saved-pt (point)))
|
||||
;; If the buffer this empty, simply print each elt.
|
||||
;; If the buffer is empty, simply print each elt.
|
||||
(if (or (not update) (eobp))
|
||||
(apply tabulated-list-printer elt)
|
||||
(while (let ((local-id (tabulated-list-get-id)))
|
||||
|
@ -424,12 +427,10 @@ of column descriptors."
|
|||
(let ((beg (point))
|
||||
(x (max tabulated-list-padding 0))
|
||||
(ncols (length tabulated-list-format))
|
||||
(lnum-width (tabulated-list-line-number-width))
|
||||
(inhibit-read-only t))
|
||||
(if display-line-numbers
|
||||
(setq x (+ x lnum-width)))
|
||||
(setq x (+ x tabulated-list-entry-lnum-width))
|
||||
(if (> tabulated-list-padding 0)
|
||||
(insert (make-string (- x lnum-width) ?\s)))
|
||||
(insert (make-string (- x tabulated-list-entry-lnum-width) ?\s)))
|
||||
(let ((tabulated-list--near-rows ; Bind it if not bound yet (Bug#25506).
|
||||
(or (bound-and-true-p tabulated-list--near-rows)
|
||||
(list (or (tabulated-list-get-entry (point-at-bol 0))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue