emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: |PATCH| describe-minor-mode and describe-minor-mode-from-indicator


From: Masatake YAMATO
Subject: Re: |PATCH| describe-minor-mode and describe-minor-mode-from-indicator
Date: Tue, 01 Apr 2003 01:35:09 +0900 (JST)

Thank you for reviewing my patch.

I agree with the almost all of your suggestions.
I'll reflect suggestions to my patch.

> > +(defun lookup-minor-mode-from-indicator (indicator)
> > +  "Return a minor mode symbol from its indicator on the modeline."
> > +  (if (and (< 0 (length indicator))
> > +      (not (string= " " (substring indicator 0 1))))
> > +      (setq indicator (concat " " indicator)))
> 
> I'd rather not assume that indicators start with a space.

What can I do?

(defun lookup-minor-mode-from-indicator (indicator)
  "Return a minor mode symbol from its indicator on the modeline."
  (if (and (< 0 (length indicator)) 
           (not (eq (aref indicator 0) ?\ )))
      (setq indicator (concat " " indicator)))
  (let ((minor-modes minor-mode-alist)
        result)
    (while minor-modes
      (let* ((minor-mode (car (car minor-modes)))
             (anindicator (car (cdr (car minor-modes)))))
        (setq anindicator (format-mode-line anindicator))
        (if (and (stringp anindicator) 
                 (string= anindicator indicator))

Should I use string-match instead of string= to compare indicator 
and anindicator? 

(concat " " indicator) is wrong idea?

Masatake YAMATO




reply via email to

[Prev in Thread] Current Thread [Next in Thread]