summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2017-10-12 13:44:16 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2017-10-12 13:44:16 -0700
commit3d0d5b4ebdf19876104d23402606f2b3cc636aca (patch)
tree87febb7bc2409f9502c86802a46915c01c546e7c /lisp/emacs-lisp
parent36375d35aa06e84865cce678559ddfa8f79a9775 (diff)
parent05d0c0f80291d25ea228d4a8572d58540bf08b52 (diff)
downloademacs-3d0d5b4ebdf19876104d23402606f2b3cc636aca.tar.gz
emacs-3d0d5b4ebdf19876104d23402606f2b3cc636aca.tar.bz2
emacs-3d0d5b4ebdf19876104d23402606f2b3cc636aca.zip
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
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/advice.el2
-rw-r--r--lisp/emacs-lisp/cl-generic.el13
-rw-r--r--lisp/emacs-lisp/cl-macs.el6
-rw-r--r--lisp/emacs-lisp/edebug.el27
-rw-r--r--lisp/emacs-lisp/generator.el6
-rw-r--r--lisp/emacs-lisp/pcase.el2
-rw-r--r--lisp/emacs-lisp/rmc.el4
7 files changed, 37 insertions, 23 deletions
diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el
index 32b6a47b053..82867667756 100644
--- a/lisp/emacs-lisp/advice.el
+++ b/lisp/emacs-lisp/advice.el
@@ -502,7 +502,7 @@
;; important advantage is that it allows the implementation of forward advice.
;; Advice information for a certain function accumulates as the value of the
;; `advice-info' property of the function symbol. This accumulation is
-;; completely independent of the fact that that function might not yet be
+;; completely independent of the fact that the function might not yet be
;; defined. The macros `defun' and `defmacro' check whether the
;; function/macro they defined had advice information
;; associated with it. If so and forward advice is enabled, the original
diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el
index b2f76abd88e..62befd4742a 100644
--- a/lisp/emacs-lisp/cl-generic.el
+++ b/lisp/emacs-lisp/cl-generic.el
@@ -204,7 +204,16 @@ OPTIONS-AND-METHODS currently understands:
DEFAULT-BODY, if present, is used as the body of a default method.
\(fn NAME ARGS [DOC-STRING] [OPTIONS-AND-METHODS...] &rest DEFAULT-BODY)"
- (declare (indent 2) (doc-string 3))
+ (declare (indent 2) (doc-string 3)
+ (debug
+ (&define name cl-lambda-list lambda-doc
+ [&rest [&or
+ ("declare" &rest sexp)
+ (":argument-precedence-order" &rest sexp)
+ (&define ":method" [&rest atom]
+ cl-generic-method-args lambda-doc
+ def-body)]]
+ def-body)))
(let* ((doc (if (stringp (car-safe options-and-methods))
(pop options-and-methods)))
(declarations nil)
@@ -422,7 +431,7 @@ The set of acceptable TYPEs (also called \"specializers\") is defined
; Like in CLOS spec, we support
; any non-list values.
cl-generic-method-args ; arguments
- [ &optional stringp ] ; documentation string
+ lambda-doc ; documentation string
def-body))) ; part to be debugged
(let ((qualifiers nil))
(while (not (listp args))
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 32ba0ac3091..40eda1e0d65 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -190,7 +190,7 @@ The name is made by appending a number to PREFIX, default \"T\"."
(&rest ("cl-declare" &rest sexp)))
(def-edebug-spec cl-declarations-or-string
- (&or stringp cl-declarations))
+ (&or lambda-doc cl-declarations))
(def-edebug-spec cl-lambda-list
(([&rest arg]
@@ -447,8 +447,8 @@ more details.
(def-edebug-spec cl-lambda-expr
(&define ("lambda" cl-lambda-list
- ;;cl-declarations-or-string
- ;;[&optional ("interactive" interactive)]
+ cl-declarations-or-string
+ [&optional ("interactive" interactive)]
def-body)))
;; Redefine function-form to also match cl-function
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index a070ff25d17..77523de32c5 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -2017,15 +2017,14 @@ expressions; a `progn' form will be returned enclosing these forms."
(def-edebug-spec defvar (symbolp &optional form stringp))
(def-edebug-spec defun
- (&define name lambda-list
- [&optional stringp]
+ (&define name lambda-list lambda-doc
[&optional ("declare" &rest sexp)]
[&optional ("interactive" interactive)]
def-body))
(def-edebug-spec defmacro
;; FIXME: Improve `declare' so we can Edebug gv-expander and
;; gv-setter declarations.
- (&define name lambda-list [&optional stringp]
+ (&define name lambda-list lambda-doc
[&optional ("declare" &rest sexp)] def-body))
(def-edebug-spec arglist lambda-list) ;; deprecated - use lambda-list.
@@ -2036,6 +2035,10 @@ expressions; a `progn' form will be returned enclosing these forms."
&optional ["&rest" arg]
)))
+(def-edebug-spec lambda-doc
+ (&optional [&or stringp
+ (&define ":documentation" def-form)]))
+
(def-edebug-spec interactive
(&optional &or stringp def-form))
@@ -3254,15 +3257,6 @@ generated symbols for methods. If a function or method to
instrument cannot be found, signal an error."
(let ((func-marker (get func 'edebug)))
(cond
- ((and (markerp func-marker) (marker-buffer func-marker))
- ;; It is uninstrumented, so instrument it.
- (with-current-buffer (marker-buffer func-marker)
- (goto-char func-marker)
- (edebug-eval-top-level-form)
- (list func)))
- ((consp func-marker)
- (message "%s is already instrumented." func)
- (list func))
((cl-generic-p func)
(let ((method-defs (cl--generic-method-files func))
symbols)
@@ -3277,6 +3271,15 @@ instrument cannot be found, signal an error."
(edebug-eval-top-level-form)
(push (edebug-form-data-symbol) symbols))))
symbols))
+ ((and (markerp func-marker) (marker-buffer func-marker))
+ ;; It is uninstrumented, so instrument it.
+ (with-current-buffer (marker-buffer func-marker)
+ (goto-char func-marker)
+ (edebug-eval-top-level-form)
+ (list func)))
+ ((consp func-marker)
+ (message "%s is already instrumented." func)
+ (list func))
(t
(let ((loc (find-function-noselect func t)))
(unless (cdr loc)
diff --git a/lisp/emacs-lisp/generator.el b/lisp/emacs-lisp/generator.el
index 3e9885900cf..410e4edcc92 100644
--- a/lisp/emacs-lisp/generator.el
+++ b/lisp/emacs-lisp/generator.el
@@ -680,7 +680,8 @@ sub-iterator function returns via `iter-end-of-sequence'."
When called as a function, NAME returns an iterator value that
encapsulates the state of a computation that produces a sequence
of values. Callers can retrieve each value using `iter-next'."
- (declare (indent defun))
+ (declare (indent defun)
+ (debug (&define name lambda-list lambda-doc def-body)))
(cl-assert lexical-binding)
(let* ((parsed-body (macroexp-parse-body body))
(declarations (car parsed-body))
@@ -692,7 +693,8 @@ of values. Callers can retrieve each value using `iter-next'."
(defmacro iter-lambda (arglist &rest body)
"Return a lambda generator.
`iter-lambda' is to `iter-defun' as `lambda' is to `defun'."
- (declare (indent defun))
+ (declare (indent defun)
+ (debug (&define lambda-list lambda-doc def-body)))
(cl-assert lexical-binding)
`(lambda ,arglist
,(cps-generate-evaluator body)))
diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el
index c703cae4458..36af88423c8 100644
--- a/lisp/emacs-lisp/pcase.el
+++ b/lisp/emacs-lisp/pcase.el
@@ -226,7 +226,7 @@ I.e. accepts the usual &optional and &rest keywords, but every
formal argument can be any pattern accepted by `pcase' (a mere
variable name being but a special case of it)."
(declare (doc-string 2) (indent defun)
- (debug ((&rest pcase-PAT) body)))
+ (debug (&define (&rest pcase-PAT) lambda-doc def-body)))
(let* ((bindings ())
(parsed-body (macroexp-parse-body body))
(args (mapcar (lambda (pat)
diff --git a/lisp/emacs-lisp/rmc.el b/lisp/emacs-lisp/rmc.el
index 417301cde06..57bc6d9b591 100644
--- a/lisp/emacs-lisp/rmc.el
+++ b/lisp/emacs-lisp/rmc.el
@@ -1,6 +1,6 @@
;;; rmc.el --- read from a multiple choice question -*- lexical-binding: t -*-
-;; Copyright (C) 2017 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2017 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
@@ -17,7 +17,7 @@
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary: