[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r102581: * lisp/progmodes/which-func.
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r102581: * lisp/progmodes/which-func.el (which-func-ff-hook): Log the error message. |
Date: |
Fri, 03 Dec 2010 19:49:49 -0500 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 102581
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Fri 2010-12-03 19:49:49 -0500
message:
* lisp/progmodes/which-func.el (which-func-ff-hook): Log the error message.
(which-func-update-1): Distinguish symbols from strings.
(which-function): Stay within 80 columns.
modified:
lisp/ChangeLog
lisp/progmodes/which-func.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2010-12-03 23:20:27 +0000
+++ b/lisp/ChangeLog 2010-12-04 00:49:49 +0000
@@ -1,3 +1,9 @@
+2010-12-04 Stefan Monnier <address@hidden>
+
+ * progmodes/which-func.el (which-func-ff-hook): Log the error message.
+ (which-func-update-1): Distinguish symbols from strings.
+ (which-function): Stay within 80 columns.
+
2010-12-03 Stefan Monnier <address@hidden>
* subr.el (with-demoted-errors): Distinguish symbols from strings.
=== modified file 'lisp/progmodes/which-func.el'
--- a/lisp/progmodes/which-func.el 2010-11-24 02:21:55 +0000
+++ b/lisp/progmodes/which-func.el 2010-12-04 00:49:49 +0000
@@ -198,7 +198,7 @@
(or (eq which-func-modes t)
(member major-mode which-func-modes))))
- (condition-case nil
+ (condition-case err
(if (and which-func-mode
(not (member major-mode which-func-non-auto-modes))
(or (null which-func-maxout)
@@ -207,6 +207,7 @@
(setq imenu--index-alist
(save-excursion (funcall imenu-create-index-function))))
(error
+ (message "which-func-ff-hook error: %S" err)
(setq which-func-mode nil))))
(defun which-func-update ()
@@ -225,7 +226,7 @@
(force-mode-line-update)))
(error
(setq which-func-mode nil)
- (error "Error in which-func-update: %s" info))))))
+ (error "Error in which-func-update: %S" info))))))
;;;###autoload
(defalias 'which-func-mode 'which-function-mode)
@@ -294,29 +295,31 @@
;; ("submenu" ("name" . marker) ... ). The list can be
;; arbitrarily nested.
(while (or alist imstack)
- (if alist
- (progn
- (setq pair (car-safe alist)
- alist (cdr-safe alist))
-
- (cond ((atom pair)) ; skip anything not a cons
-
- ((imenu--subalist-p pair)
- (setq imstack (cons alist imstack)
- namestack (cons (car pair) namestack)
- alist (cdr pair)))
-
- ((number-or-marker-p (setq mark (cdr pair)))
- (if (>= (setq offset (- (point) mark)) 0)
- (if (< offset minoffset) ; find the closest item
- (setq minoffset offset
- name (funcall
- which-func-imenu-joiner-function
- (reverse (cons (car pair)
- namestack)))))))))
- (setq alist (car imstack)
- namestack (cdr namestack)
- imstack (cdr imstack))))))
+ (if (null alist)
+ (setq alist (car imstack)
+ namestack (cdr namestack)
+ imstack (cdr imstack))
+
+ (setq pair (car-safe alist)
+ alist (cdr-safe alist))
+
+ (cond
+ ((atom pair)) ; Skip anything not a cons.
+
+ ((imenu--subalist-p pair)
+ (setq imstack (cons alist imstack)
+ namestack (cons (car pair) namestack)
+ alist (cdr pair)))
+
+ ((number-or-marker-p (setq mark (cdr pair)))
+ (when (and (>= (setq offset (- (point) mark)) 0)
+ (< offset minoffset)) ; Find the closest item.
+ (setq minoffset offset
+ name (if (null which-func-imenu-joiner-function)
+ (car pair)
+ (funcall
+ which-func-imenu-joiner-function
+ (reverse (cons (car pair) namestack))))))))))))
;; Try using add-log support.
(when (and (null name) (boundp 'add-log-current-defun-function)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r102581: * lisp/progmodes/which-func.el (which-func-ff-hook): Log the error message.,
Stefan Monnier <=