[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tabbar-mode breaks debugging with match data
From: |
David PONCE |
Subject: |
Re: tabbar-mode breaks debugging with match data |
Date: |
Mon, 14 Mar 2005 14:27:31 +0100 (CET) |
Stefan Monnier wrote:
>>! ;; Return `mode-name' if not blank, `major-mode' otherwise.
>>! (if (and (stringp mode-name)
>>! ;; Take care of preserving the match-data because this
>>! ;; function is called when updating the header line.
>>! (save-match-data
>>! (string-match "[^ ]" mode-name)))
>
>
> Any reason why you don't use simpler a test like (zerop (length mode-name))
> or (equal mode-name ""), or even just check for mode-name being non-nil?
>
> Are there cases where mode-names are made of nothing but spaces?
> Is the empty string ever used for the mode-name?
I really don't know and I just wanted my code to anticipate such cases.
However you're probably right that using (zerop (length mode-name))
should be good enough!
David