* lisp/help-fns.el (help-fns--obsolete): Handle macros properly.
* lisp/subr.el (declare): Doc fix.
+2012-09-25 Chong Yidong <cyd@gnu.org>
+
+ * subr.el (declare): Doc fix.
+
+ * help-fns.el (help-fns--obsolete): Handle macros properly.
+
2012-09-25 Chong Yidong <cyd@gnu.org>
* bookmark.el (bookmark-jump-noselect): Use a declare form to mark
(insert "'.\n"))))
(defun help-fns--obsolete (function)
- (let* ((obsolete (and
- ;; `function' might be a lambda construct.
- (symbolp function)
- (get function 'byte-obsolete-info)))
+ ;; Ignore lambda constructs, keyboard macros, etc.
+ (let* ((obsolete (and (symbolp function)
+ (get function 'byte-obsolete-info)))
(use (car obsolete)))
(when obsolete
- (insert "\nThis function is obsolete")
+ (insert "\nThis "
+ (if (eq (car-safe (symbol-function 'with-current-buffer))
+ 'macro)
+ "macro"
+ "function")
+ " is obsolete")
(when (nth 2 obsolete)
(insert (format " since %s" (nth 2 obsolete))))
(insert (cond ((stringp use) (concat ";\n" use))
(fill-region-as-paragraph (save-excursion (goto-char pt1) (forward-line 0) (point))
(point)))
(terpri)(terpri)
-
+
(let* ((doc-raw (condition-case err
(documentation function t)
(error (format "No Doc! %S" err))))
,@(cdr (cdr spec))))))
(defmacro declare (&rest _specs)
- "Do not evaluate any arguments and return nil.
-Treated as a declaration when used at the right place in a
-`defmacro' form. \(See Info anchor `(elisp)Definition of declare'.)"
+ "Do not evaluate any arguments, and return nil.
+If a `declare' form appears as the first form in the body of a
+`defun' or `defmacro' form, SPECS specifies various additional
+information about the function or macro; these go into effect
+during the evaluation of the `defun' or `defmacro' form.
+
+The possible values of SPECS are specified by
+`defun-declarations-alist' and `macro-declarations-alist'."
;; FIXME: edebug spec should pay attention to defun-declarations-alist.
nil)
))