emacs: Various cosmetic changes

This commit is contained in:
Jonas Bernoulli 2020-08-08 13:49:53 +02:00 committed by David Bremner
parent 73cc4105aa
commit 73b8f0b8d7
6 changed files with 34 additions and 44 deletions

View file

@ -36,7 +36,8 @@
This prints make dependencies to `standard-output' based on the
top-level `require' expressions in the current buffer. Paths in
rules will be given relative to DIR, or `default-directory'."
(setq dir (or dir default-directory))
(unless dir
(setq dir default-directory))
(save-excursion
(goto-char (point-min))
(condition-case nil

View file

@ -53,9 +53,8 @@
(defgroup notmuch-send nil
"Sending messages from Notmuch."
:group 'notmuch)
(custom-add-to-group 'notmuch-send 'message 'custom-group)
:group 'notmuch
:group 'message)
(defgroup notmuch-tag nil
"Tags and tagging in Notmuch."
@ -782,8 +781,7 @@ signaled error. This function does not return."
(insert extra)
(unless (bolp)
(newline)))))
(error "%s"
(concat msg (and extra " (see *Notmuch errors* for more details)"))))
(error "%s%s" msg (if extra " (see *Notmuch errors* for more details)" "")))
(defun notmuch-check-async-exit-status (proc msg &optional command err)
"If PROC exited abnormally, pop up an error buffer and signal an error.

View file

@ -39,12 +39,9 @@ The parser always consumes input from point in the current
buffer. Hence, the caller is allowed to delete any data before
point and may resynchronize after an error by moving point."
(vector 'notmuch-sexp-parser
;; List depth
0
;; Partial parse position marker
nil
;; Partial parse state
nil))
0 ; List depth
nil ; Partial parse position marker
nil)) ; Partial parse state
(defmacro notmuch-sexp--depth (sp) `(aref ,sp 1))
(defmacro notmuch-sexp--partial-pos (sp) `(aref ,sp 2))

View file

@ -505,21 +505,17 @@ message at DEPTH in the current thread."
(defun notmuch-show-insert-part-header (nth content-type declared-type
&optional name comment)
(let ((button)
(base-label (concat (and name (concat name ": "))
(let ((base-label (concat (and name (concat name ": "))
declared-type
(and (not (string-equal declared-type content-type))
(concat " (as " content-type ")"))
comment)))
(setq button
(insert-button
(prog1 (insert-button
(concat "[ " base-label " ]")
:base-label base-label
:type 'notmuch-show-part-button-type
:notmuch-part-hidden nil))
(insert "\n")
;; return button
button))
:notmuch-part-hidden nil)
(insert "\n"))))
(defun notmuch-show-toggle-part-invisibility (&optional button)
(interactive)

View file

@ -24,7 +24,6 @@
;;
;;; Commentary:
;;
;; Rstdoc provides a facility to extract all of the docstrings defined in
;; an elisp source file. Usage:

View file

@ -154,9 +154,9 @@ running, quit if it terminated."
(defun notmuch-test-expect-equal (output expected)
"Compare OUTPUT with EXPECTED. Report any discrepencies."
(if (equal output expected)
t
(cond
((equal output expected)
t)
((and (listp output)
(listp expected))
;; Reporting the difference between two lists is done by
@ -167,9 +167,8 @@ running, quit if it terminated."
for e in expected
if (not (equal o e))
collect (notmuch-test-report-unexpected o e))))
(t
(notmuch-test-report-unexpected output expected)))))
(notmuch-test-report-unexpected output expected))))
(defun notmuch-post-command ()
(run-hooks 'post-command-hook))