From 9a0f8f2e959c1867c848a0c33cfaee70a201c83f Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Thu, 26 Jul 2012 00:11:23 +0800 Subject: [PATCH] Avoid leaving nil in the alist in cc-imenu-objc-function Fixes: debbugs:12029 --- lisp/ChangeLog | 5 +++++ lisp/progmodes/cc-menus.el | 8 ++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e693f1a62f6..ac1482df4e1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-07-25 Leo Liu + + * progmodes/cc-menus.el (cc-imenu-objc-function): Avoid leaving nil in + the alist (bug#12029). + 2012-07-25 Chong Yidong * mouse.el (mouse-drag-track): Do not set the mark if the user diff --git a/lisp/progmodes/cc-menus.el b/lisp/progmodes/cc-menus.el index a53d65f6307..76e3002abd2 100644 --- a/lisp/progmodes/cc-menus.el +++ b/lisp/progmodes/cc-menus.el @@ -399,14 +399,10 @@ Example: str2 "@protocol"))) (setq str (cc-imenu-objc-remove-white-space str)) (setq methodlist (cons (cons str2 - (match-beginning langnum)) + (match-beginning langnum)) methodlist)) - (setq toplist (cons nil (cons (cons str - methodlist) toplist)) + (setq toplist (cons (cons str methodlist) toplist) methodlist nil)))) - ;; - (if (eq (car toplist) nil) - (setq toplist (cdr toplist))) ;; In this buffer, there is only one or zero @{interface|implementation|protocol}. (if (< classcount 2) -- 2.39.2