summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/advice.el22
-rw-r--r--lisp/emacs-lisp/easy-mmode.el4
-rw-r--r--lisp/emacs-lisp/sregex.el4
3 files changed, 9 insertions, 21 deletions
diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el
index fe4639cf01a..8023bc58a53 100644
--- a/lisp/emacs-lisp/advice.el
+++ b/lisp/emacs-lisp/advice.el
@@ -2467,23 +2467,11 @@ will clear the cache."
"Take a macro function DEFINITION and make a lambda out of it."
`(cdr ,definition))
-;; There is no way to determine whether some subr is a special form or not,
-;; hence we need this list (which is probably out of date):
-(defvar ad-special-forms
- (let ((tem '(and catch cond condition-case defconst defmacro
- defun defvar function if interactive let let*
- or prog1 prog2 progn quote save-current-buffer
- save-excursion save-restriction save-window-excursion
- setq setq-default unwind-protect while
- with-output-to-temp-buffer)))
- ;; track-mouse could be void in some configurations.
- (if (fboundp 'track-mouse)
- (push 'track-mouse tem))
- (mapcar 'symbol-function tem)))
-
-(defmacro ad-special-form-p (definition)
- ;;"non-nil if DEFINITION is a special form."
- (list 'memq definition 'ad-special-forms))
+(defun ad-special-form-p (definition)
+ "Non-nil iff DEFINITION is a special form."
+ (if (and (symbolp definition) (fboundp definition))
+ (setq definition (indirect-function definition)))
+ (and (subrp definition) (eq (cdr (subr-arity definition)) 'unevalled)))
(defmacro ad-interactive-p (definition)
;;"non-nil if DEFINITION can be called interactively."
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index 19ed39a2b42..79ecf52dfbc 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -103,7 +103,7 @@ used (see below).
BODY contains code to execute each time the mode is activated or deactivated.
It is executed after toggling the mode,
- and before running the hook variable `mode-HOOK'.
+ and before running the hook variable `MODE-hook'.
Before the actual body code, you can write keyword arguments (alternating
keywords and values). These following keyword arguments are supported (other
keywords will be passed to `defcustom' if the minor mode is global):
@@ -486,7 +486,7 @@ BASE-next also tries to make sure that the whole entry is visible by
the next entry) and recentering if necessary.
ENDFUN should return the end position (with or without moving point).
NARROWFUN non-nil means to check for narrowing before moving, and if
-found, do widen first and then call NARROWFUN with no args after moving."
+found, do `widen' first and then call NARROWFUN with no args after moving."
(let* ((base-name (symbol-name base))
(prev-sym (intern (concat base-name "-prev")))
(next-sym (intern (concat base-name "-next")))
diff --git a/lisp/emacs-lisp/sregex.el b/lisp/emacs-lisp/sregex.el
index 8041aefc077..67824c40632 100644
--- a/lisp/emacs-lisp/sregex.el
+++ b/lisp/emacs-lisp/sregex.el
@@ -436,11 +436,11 @@ Here are the clauses allowed in an `sregex' or `sregexq' expression:
or end of a word.
- the symbol `bow'
- Stands for \"\\\\\\=<\", matching the empty string at the beginning of a
+ Stands for \"\\\\=\\<\", matching the empty string at the beginning of a
word.
- the symbol `eow'
- Stands for \"\\\\\\=>\", matching the empty string at the end of a word.
+ Stands for \"\\\\=\\>\", matching the empty string at the end of a word.
- the symbol `wordchar'
Stands for the regex \"\\\\w\", matching a word-constituent character