Detlev Zundel writes: > As I understand the documentation, the variable > 'display-time-mail-function' should allow to provide a function which > decides whether to display the mail icon in the status area. > > Unfortunately the code does not allow this semantic, as the code uses an > or expression over several possibilities (lisp/time.el:407): > > (mail (or (and display-time-mail-function > (funcall display-time-mail-function)) > (and display-time-mail-directory > (display-time-mail-check-directory)) > (and (stringp mail-spool-file) > (or (null display-time-server-down-time) > ;; If have been down for 20 min, try again. > (> (- (nth 1 now) display-time-server-down-time) > 1200) > (and (< (nth 1 now) display-time-server-down-time) > (> (- (nth 1 now) > display-time-server-down-time) > -64336))) > (let ((start-time (current-time))) > (prog1 > (display-time-file-nonempty-p mail-spool-file) > (if (> (- (nth 1 (current-time)) > (nth 1 start-time)) > 20) > ;; Record that mail file is not accessible. > (setq display-time-server-down-time > (nth 1 (current-time))) > ;; Record that mail file is accessible. > (setq display-time-server-down-time nil))))))) > > > So when display-time-mail-function is set but returns nil, then the > following tests will still be evaluated instead of using this negative > result. > > As a fix I propose the attached patch. This patch is actually erroneous - it has a missing closing parenthesis and an unrelated typeo. The attached patch is tested. Sorry for the inconvenience. Cheers Detlev -- Ftpd never switches uid and euid, it uses setfsuid(2) instead. The main reason is that uid switching has been exploited in several breakins, but the sheer ugliness of uid switching counts too. -- pure-ftpd(8)