Mercurial > emacs
changeset 48224:0d0908b6b4cc
(timeclock-modeline-display): Use assq as well as memq to find
`global-mode-string' within `mode-line-format'. The structure of
that variable has changed in 21.3.
author | John Wiegley <johnw@newartisans.com> |
---|---|
date | Fri, 08 Nov 2002 20:28:55 +0000 |
parents | 2d1fe430cc35 |
children | 75ced2cd606e |
files | lisp/calendar/timeclock.el |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/calendar/timeclock.el Fri Nov 08 20:28:16 2002 +0000 +++ b/lisp/calendar/timeclock.el Fri Nov 08 20:28:55 2002 +0000 @@ -273,13 +273,13 @@ (> (prefix-numeric-value arg) 0) (not timeclock-modeline-display)))) (if on-p - (let ((list-entry (memq 'global-mode-string - mode-line-format))) + (let ((list-entry (or (memq 'global-mode-string mode-line-format) + ;; In Emacs 21.3 we must use assq + (assq 'global-mode-string mode-line-format)))) (unless (or (null list-entry) (memq 'timeclock-mode-string mode-line-format)) - (setcdr list-entry - (cons 'timeclock-mode-string - (cdr list-entry)))) + (setcdr list-entry (cons 'timeclock-mode-string + (cdr list-entry)))) (unless (memq 'timeclock-update-modeline timeclock-event-hook) (add-hook 'timeclock-event-hook 'timeclock-update-modeline)) (when timeclock-update-timer