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 _______________________________________________ Emacs-pretest-bug mailing list [email protected] http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
