]> git.notmuchmail.org Git - notmuch/commitdiff
Fix problem with notmuch-hello-nice-number
authorDirk Hohndel <hohndel@infradead.org>
Fri, 29 Oct 2010 22:49:01 +0000 (15:49 -0700)
committerCarl Worth <cworth@cworth.org>
Fri, 29 Oct 2010 22:49:01 +0000 (15:49 -0700)
Without this little patch notmuch fails if asked to display a saved
search that has zero results

Edited-by: David Edmondson <dme@dme.org>: With code that is a little
more "emacsy".

emacs/notmuch-hello.el

index c384313f69fc1c052de87ad29c272251c351c89a..4b6a90dbc0ecc3e5a334c3a68d301e451c57fa46 100644 (file)
@@ -115,6 +115,7 @@ Typically \",\" in the US and UK and \".\" in Europe."
     (while (> n 0)
       (push (% n 1000) result)
       (setq n (/ n 1000)))
+    (setq result (or result '(0)))
     (apply #'concat
      (number-to-string (car result))
      (mapcar (lambda (elem)