diff options
| author | Glenn Morris | 2017-11-29 17:12:05 -0800 |
|---|---|---|
| committer | Glenn Morris | 2017-11-29 17:12:05 -0800 |
| commit | 7aedb6116ffaa6590c86e70380f533385c1ced58 (patch) | |
| tree | 186436d57261f5bd0e5f1bff8844615c17b46128 /lisp | |
| parent | 728d259243206136387b6b59c2efb7de8cd9f6ed (diff) | |
| parent | 02d114d6b85e02132d5f99ead517b69dbdd77e35 (diff) | |
| download | emacs-7aedb6116ffaa6590c86e70380f533385c1ced58.tar.gz emacs-7aedb6116ffaa6590c86e70380f533385c1ced58.zip | |
Merge from origin/emacs-26
02d114d6b8 * lisp/tree-widget.el (tree-widget-end-guide): Escape it. ...
0a85d12474 Fix ELisp "Warning Tips"
06d05fec84 Fix Bug#29163
ac64fdb248 Harden exec_byte_code against redefining 'error'
700f74e4c8 Fix Edebug specs for if-let* and and-let* (Bug#29236)
0ded1b41a9 Fix Edebug's handling of dotted specs (bug#6415)
16358d4fcb Improve documentation of "constant" symbols
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/emacs-lisp/cl-macs.el | 2 | ||||
| -rw-r--r-- | lisp/emacs-lisp/edebug.el | 67 | ||||
| -rw-r--r-- | lisp/emacs-lisp/subr-x.el | 8 | ||||
| -rw-r--r-- | lisp/net/tramp.el | 5 | ||||
| -rw-r--r-- | lisp/tree-widget.el | 2 |
5 files changed, 48 insertions, 36 deletions
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 10792aefdcc..f5311041cce 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el | |||
| @@ -694,7 +694,7 @@ its argument list allows full Common Lisp conventions." | |||
| 694 | (defmacro cl-destructuring-bind (args expr &rest body) | 694 | (defmacro cl-destructuring-bind (args expr &rest body) |
| 695 | "Bind the variables in ARGS to the result of EXPR and execute BODY." | 695 | "Bind the variables in ARGS to the result of EXPR and execute BODY." |
| 696 | (declare (indent 2) | 696 | (declare (indent 2) |
| 697 | (debug (&define cl-macro-list def-form cl-declarations def-body))) | 697 | (debug (&define cl-macro-list1 def-form cl-declarations def-body))) |
| 698 | (let* ((cl--bind-lets nil) (cl--bind-forms nil) | 698 | (let* ((cl--bind-lets nil) (cl--bind-forms nil) |
| 699 | (cl--bind-defs nil) (cl--bind-block 'cl-none) (cl--bind-enquote nil)) | 699 | (cl--bind-defs nil) (cl--bind-block 'cl-none) (cl--bind-enquote nil)) |
| 700 | (cl--do-arglist (or args '(&aux)) expr) | 700 | (cl--do-arglist (or args '(&aux)) expr) |
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 0e8f77e29a8..dec986ae3e3 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el | |||
| @@ -950,7 +950,8 @@ circular objects. Let `read' read everything else." | |||
| 950 | 950 | ||
| 951 | ;;; Cursors for traversal of list and vector elements with offsets. | 951 | ;;; Cursors for traversal of list and vector elements with offsets. |
| 952 | 952 | ||
| 953 | (defvar edebug-dotted-spec nil) | 953 | (defvar edebug-dotted-spec nil |
| 954 | "Set to t when matching after the dot in a dotted spec list.") | ||
| 954 | 955 | ||
| 955 | (defun edebug-new-cursor (expressions offsets) | 956 | (defun edebug-new-cursor (expressions offsets) |
| 956 | ;; Return a new cursor for EXPRESSIONS with OFFSETS. | 957 | ;; Return a new cursor for EXPRESSIONS with OFFSETS. |
| @@ -1526,8 +1527,6 @@ expressions; a `progn' form will be returned enclosing these forms." | |||
| 1526 | 1527 | ||
| 1527 | ;;; Matching of specs. | 1528 | ;;; Matching of specs. |
| 1528 | 1529 | ||
| 1529 | (defvar edebug-after-dotted-spec nil) | ||
| 1530 | |||
| 1531 | (defvar edebug-matching-depth 0) ;; initial value | 1530 | (defvar edebug-matching-depth 0) ;; initial value |
| 1532 | 1531 | ||
| 1533 | 1532 | ||
| @@ -1588,36 +1587,48 @@ expressions; a `progn' form will be returned enclosing these forms." | |||
| 1588 | (let ((edebug-dotted-spec t));; Containing spec list was dotted. | 1587 | (let ((edebug-dotted-spec t));; Containing spec list was dotted. |
| 1589 | (edebug-match-specs cursor (list specs) remainder-handler))) | 1588 | (edebug-match-specs cursor (list specs) remainder-handler))) |
| 1590 | 1589 | ||
| 1591 | ;; Is the form dotted? | 1590 | ;; The reason for processing here &optional, &rest, and vectors |
| 1592 | ((not (listp (edebug-cursor-expressions cursor)));; allow nil | 1591 | ;; which might contain them even when the form is dotted is to |
| 1592 | ;; allow them to match nothing, so we can advance to the dotted | ||
| 1593 | ;; part of the spec. | ||
| 1594 | ((or (listp (edebug-cursor-expressions cursor)) | ||
| 1595 | (vectorp (car specs)) | ||
| 1596 | (memq (car specs) '(&optional &rest))) ; Process normally. | ||
| 1597 | ;; (message "%scursor=%s specs=%s" | ||
| 1598 | ;; (make-string edebug-matching-depth ?|) cursor (car specs)) | ||
| 1599 | (let* ((spec (car specs)) | ||
| 1600 | (rest) | ||
| 1601 | (first-char (and (symbolp spec) (aref (symbol-name spec) 0))) | ||
| 1602 | (match (cond | ||
| 1603 | ((eq ?& first-char);; "&" symbols take all following specs. | ||
| 1604 | (funcall (get-edebug-spec spec) cursor (cdr specs))) | ||
| 1605 | ((eq ?: first-char);; ":" symbols take one following spec. | ||
| 1606 | (setq rest (cdr (cdr specs))) | ||
| 1607 | (funcall (get-edebug-spec spec) cursor (car (cdr specs)))) | ||
| 1608 | (t;; Any other normal spec. | ||
| 1609 | (setq rest (cdr specs)) | ||
| 1610 | (edebug-match-one-spec cursor spec))))) | ||
| 1611 | ;; The first match result may not be a list, which can happen | ||
| 1612 | ;; when matching the tail of a dotted list. In that case | ||
| 1613 | ;; there is no remainder. | ||
| 1614 | (if (listp match) | ||
| 1615 | (nconc match | ||
| 1616 | (funcall remainder-handler cursor rest remainder-handler)) | ||
| 1617 | match))) | ||
| 1618 | |||
| 1619 | ;; Must be a dotted form, with no remaining &rest or &optional specs to | ||
| 1620 | ;; match. | ||
| 1621 | (t | ||
| 1593 | (if (not edebug-dotted-spec) | 1622 | (if (not edebug-dotted-spec) |
| 1594 | (edebug-no-match cursor "Dotted spec required.")) | 1623 | (edebug-no-match cursor "Dotted spec required.")) |
| 1595 | ;; Cancel dotted spec and dotted form. | 1624 | ;; Cancel dotted spec and dotted form. |
| 1596 | (let ((edebug-dotted-spec) | 1625 | (let ((edebug-dotted-spec) |
| 1597 | (this-form (edebug-cursor-expressions cursor)) | 1626 | (this-form (edebug-cursor-expressions cursor)) |
| 1598 | (this-offset (edebug-cursor-offsets cursor))) | 1627 | (this-offset (edebug-cursor-offsets cursor))) |
| 1599 | ;; Wrap the form in a list, (by changing the cursor??)... | 1628 | ;; Wrap the form in a list, by changing the cursor. |
| 1600 | (edebug-set-cursor cursor (list this-form) this-offset) | 1629 | (edebug-set-cursor cursor (list this-form) this-offset) |
| 1601 | ;; and process normally, then unwrap the result. | 1630 | ;; Process normally, then unwrap the result. |
| 1602 | (car (edebug-match-specs cursor specs remainder-handler)))) | 1631 | (car (edebug-match-specs cursor specs remainder-handler))))))) |
| 1603 | |||
| 1604 | (t;; Process normally. | ||
| 1605 | (let* ((spec (car specs)) | ||
| 1606 | (rest) | ||
| 1607 | (first-char (and (symbolp spec) (aref (symbol-name spec) 0)))) | ||
| 1608 | ;;(message "spec = %s first char = %s" spec first-char) (sit-for 1) | ||
| 1609 | (nconc | ||
| 1610 | (cond | ||
| 1611 | ((eq ?& first-char);; "&" symbols take all following specs. | ||
| 1612 | (funcall (get-edebug-spec spec) cursor (cdr specs))) | ||
| 1613 | ((eq ?: first-char);; ":" symbols take one following spec. | ||
| 1614 | (setq rest (cdr (cdr specs))) | ||
| 1615 | (funcall (get-edebug-spec spec) cursor (car (cdr specs)))) | ||
| 1616 | (t;; Any other normal spec. | ||
| 1617 | (setq rest (cdr specs)) | ||
| 1618 | (edebug-match-one-spec cursor spec))) | ||
| 1619 | (funcall remainder-handler cursor rest remainder-handler))))))) | ||
| 1620 | |||
| 1621 | 1632 | ||
| 1622 | ;; Define specs for all the symbol specs with functions used to process them. | 1633 | ;; Define specs for all the symbol specs with functions used to process them. |
| 1623 | ;; Perhaps we shouldn't be doing this with edebug-form-specs since the | 1634 | ;; Perhaps we shouldn't be doing this with edebug-form-specs since the |
diff --git a/lisp/emacs-lisp/subr-x.el b/lisp/emacs-lisp/subr-x.el index 9ff742c4331..37bcfc2003d 100644 --- a/lisp/emacs-lisp/subr-x.el +++ b/lisp/emacs-lisp/subr-x.el | |||
| @@ -133,7 +133,7 @@ be of the form (VALUEFORM), which is evaluated and checked for | |||
| 133 | nil; i.e. SYMBOL can be omitted if only the test result is of | 133 | nil; i.e. SYMBOL can be omitted if only the test result is of |
| 134 | interest." | 134 | interest." |
| 135 | (declare (indent 2) | 135 | (declare (indent 2) |
| 136 | (debug ((&rest [&or symbolp (symbolp form) (sexp)]) | 136 | (debug ((&rest [&or symbolp (symbolp form) (form)]) |
| 137 | form body))) | 137 | form body))) |
| 138 | (if varlist | 138 | (if varlist |
| 139 | `(let* ,(setq varlist (internal--build-bindings varlist)) | 139 | `(let* ,(setq varlist (internal--build-bindings varlist)) |
| @@ -156,7 +156,9 @@ VARLIST is the same as in `if-let*'." | |||
| 156 | "Bind variables according to VARLIST and conditionally eval BODY. | 156 | "Bind variables according to VARLIST and conditionally eval BODY. |
| 157 | Like `when-let*', except if BODY is empty and all the bindings | 157 | Like `when-let*', except if BODY is empty and all the bindings |
| 158 | are non-nil, then the result is non-nil." | 158 | are non-nil, then the result is non-nil." |
| 159 | (declare (indent 1) (debug when-let*)) | 159 | (declare (indent 1) |
| 160 | (debug ((&rest [&or symbolp (symbolp form) (form)]) | ||
| 161 | body))) | ||
| 160 | (let (res) | 162 | (let (res) |
| 161 | (if varlist | 163 | (if varlist |
| 162 | `(let* ,(setq varlist (internal--build-bindings varlist)) | 164 | `(let* ,(setq varlist (internal--build-bindings varlist)) |
| @@ -168,7 +170,7 @@ are non-nil, then the result is non-nil." | |||
| 168 | "Bind variables according to SPEC and eval THEN or ELSE. | 170 | "Bind variables according to SPEC and eval THEN or ELSE. |
| 169 | Like `if-let*' except SPEC can have the form (SYMBOL VALUEFORM)." | 171 | Like `if-let*' except SPEC can have the form (SYMBOL VALUEFORM)." |
| 170 | (declare (indent 2) | 172 | (declare (indent 2) |
| 171 | (debug ([&or (&rest [&or symbolp (symbolp form) (sexp)]) | 173 | (debug ([&or (&rest [&or symbolp (symbolp form) (form)]) |
| 172 | (symbolp form)] | 174 | (symbolp form)] |
| 173 | form body)) | 175 | form body)) |
| 174 | (obsolete "use `if-let*' instead." "26.1")) | 176 | (obsolete "use `if-let*' instead." "26.1")) |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index e8d11584fab..cf2218dd1ec 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -1055,7 +1055,7 @@ Also see `tramp-file-name-structure'.") | |||
| 1055 | "\\(-\\|[^/|:]\\{2,\\}\\)" | 1055 | "\\(-\\|[^/|:]\\{2,\\}\\)" |
| 1056 | ;; At least one character for method. | 1056 | ;; At least one character for method. |
| 1057 | "[^/|:]+") | 1057 | "[^/|:]+") |
| 1058 | ":\\'") | 1058 | ":") |
| 1059 | "Regular expression matching file names handled by Tramp autoload. | 1059 | "Regular expression matching file names handled by Tramp autoload. |
| 1060 | It must match the initial `tramp-syntax' settings. It should not | 1060 | It must match the initial `tramp-syntax' settings. It should not |
| 1061 | match file names at root of the underlying local file system, | 1061 | match file names at root of the underlying local file system, |
| @@ -2323,8 +2323,7 @@ Falls back to normal file name handler if no Tramp file name handler exists." | |||
| 2323 | 'tramp-autoload-file-name-handler)) | 2323 | 'tramp-autoload-file-name-handler)) |
| 2324 | (put 'tramp-autoload-file-name-handler 'safe-magic t))) | 2324 | (put 'tramp-autoload-file-name-handler 'safe-magic t))) |
| 2325 | 2325 | ||
| 2326 | ;;;###autoload | 2326 | ;;;###autoload (tramp-register-autoload-file-name-handlers) |
| 2327 | (tramp-register-autoload-file-name-handlers) | ||
| 2328 | 2327 | ||
| 2329 | (defun tramp-use-absolute-autoload-file-names () | 2328 | (defun tramp-use-absolute-autoload-file-names () |
| 2330 | "Change Tramp autoload objects to use absolute file names. | 2329 | "Change Tramp autoload objects to use absolute file names. |
diff --git a/lisp/tree-widget.el b/lisp/tree-widget.el index 130d8af07e5..9599cc7f067 100644 --- a/lisp/tree-widget.el +++ b/lisp/tree-widget.el | |||
| @@ -504,7 +504,7 @@ Handle mouse button 1 click on buttons.") | |||
| 504 | 504 | ||
| 505 | (define-widget 'tree-widget-end-guide 'item | 505 | (define-widget 'tree-widget-end-guide 'item |
| 506 | "End of a vertical guide line." | 506 | "End of a vertical guide line." |
| 507 | :tag " `" | 507 | :tag " \\=`" |
| 508 | ;;:tag-glyph (tree-widget-find-image "end-guide") | 508 | ;;:tag-glyph (tree-widget-find-image "end-guide") |
| 509 | :format "%t" | 509 | :format "%t" |
| 510 | ) | 510 | ) |