[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r110191: Minor fixes for the function
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r110191: Minor fixes for the function obsolescence feature. |
Date: |
Tue, 25 Sep 2012 13:33:43 +0800 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 110191
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Tue 2012-09-25 13:33:43 +0800
message:
Minor fixes for the function obsolescence feature.
* lisp/help-fns.el (help-fns--obsolete): Handle macros properly.
* lisp/subr.el (declare): Doc fix.
modified:
lisp/ChangeLog
lisp/help-fns.el
lisp/subr.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-09-25 04:13:02 +0000
+++ b/lisp/ChangeLog 2012-09-25 05:33:43 +0000
@@ -1,5 +1,11 @@
2012-09-25 Chong Yidong <address@hidden>
+ * subr.el (declare): Doc fix.
+
+ * help-fns.el (help-fns--obsolete): Handle macros properly.
+
+2012-09-25 Chong Yidong <address@hidden>
+
* bookmark.el (bookmark-jump-noselect): Use a declare form to mark
this function obsolete.
=== modified file 'lisp/help-fns.el'
--- a/lisp/help-fns.el 2012-09-11 13:43:06 +0000
+++ b/lisp/help-fns.el 2012-09-25 05:33:43 +0000
@@ -488,13 +488,17 @@
(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))
@@ -611,7 +615,7 @@
(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))))
=== modified file 'lisp/subr.el'
--- a/lisp/subr.el 2012-09-25 04:13:02 +0000
+++ b/lisp/subr.el 2012-09-25 05:33:43 +0000
@@ -271,9 +271,14 @@
,@(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)
))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r110191: Minor fixes for the function obsolescence feature.,
Chong Yidong <=