mirror of
https://git.notmuchmail.org/git/notmuch
synced 2025-02-17 23:53:15 +01:00
emacs: Various cosmetic changes
This commit is contained in:
parent
73cc4105aa
commit
73b8f0b8d7
6 changed files with 34 additions and 44 deletions
|
@ -36,7 +36,8 @@
|
||||||
This prints make dependencies to `standard-output' based on the
|
This prints make dependencies to `standard-output' based on the
|
||||||
top-level `require' expressions in the current buffer. Paths in
|
top-level `require' expressions in the current buffer. Paths in
|
||||||
rules will be given relative to DIR, or `default-directory'."
|
rules will be given relative to DIR, or `default-directory'."
|
||||||
(setq dir (or dir default-directory))
|
(unless dir
|
||||||
|
(setq dir default-directory))
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(condition-case nil
|
(condition-case nil
|
||||||
|
|
|
@ -53,9 +53,8 @@
|
||||||
|
|
||||||
(defgroup notmuch-send nil
|
(defgroup notmuch-send nil
|
||||||
"Sending messages from Notmuch."
|
"Sending messages from Notmuch."
|
||||||
:group 'notmuch)
|
:group 'notmuch
|
||||||
|
:group 'message)
|
||||||
(custom-add-to-group 'notmuch-send 'message 'custom-group)
|
|
||||||
|
|
||||||
(defgroup notmuch-tag nil
|
(defgroup notmuch-tag nil
|
||||||
"Tags and tagging in Notmuch."
|
"Tags and tagging in Notmuch."
|
||||||
|
@ -782,8 +781,7 @@ signaled error. This function does not return."
|
||||||
(insert extra)
|
(insert extra)
|
||||||
(unless (bolp)
|
(unless (bolp)
|
||||||
(newline)))))
|
(newline)))))
|
||||||
(error "%s"
|
(error "%s%s" msg (if extra " (see *Notmuch errors* for more details)" "")))
|
||||||
(concat msg (and extra " (see *Notmuch errors* for more details)"))))
|
|
||||||
|
|
||||||
(defun notmuch-check-async-exit-status (proc msg &optional command err)
|
(defun notmuch-check-async-exit-status (proc msg &optional command err)
|
||||||
"If PROC exited abnormally, pop up an error buffer and signal an error.
|
"If PROC exited abnormally, pop up an error buffer and signal an error.
|
||||||
|
|
|
@ -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
|
buffer. Hence, the caller is allowed to delete any data before
|
||||||
point and may resynchronize after an error by moving point."
|
point and may resynchronize after an error by moving point."
|
||||||
(vector 'notmuch-sexp-parser
|
(vector 'notmuch-sexp-parser
|
||||||
;; List depth
|
0 ; List depth
|
||||||
0
|
nil ; Partial parse position marker
|
||||||
;; Partial parse position marker
|
nil)) ; Partial parse state
|
||||||
nil
|
|
||||||
;; Partial parse state
|
|
||||||
nil))
|
|
||||||
|
|
||||||
(defmacro notmuch-sexp--depth (sp) `(aref ,sp 1))
|
(defmacro notmuch-sexp--depth (sp) `(aref ,sp 1))
|
||||||
(defmacro notmuch-sexp--partial-pos (sp) `(aref ,sp 2))
|
(defmacro notmuch-sexp--partial-pos (sp) `(aref ,sp 2))
|
||||||
|
|
|
@ -505,21 +505,17 @@ message at DEPTH in the current thread."
|
||||||
|
|
||||||
(defun notmuch-show-insert-part-header (nth content-type declared-type
|
(defun notmuch-show-insert-part-header (nth content-type declared-type
|
||||||
&optional name comment)
|
&optional name comment)
|
||||||
(let ((button)
|
(let ((base-label (concat (and name (concat name ": "))
|
||||||
(base-label (concat (and name (concat name ": "))
|
|
||||||
declared-type
|
declared-type
|
||||||
(and (not (string-equal declared-type content-type))
|
(and (not (string-equal declared-type content-type))
|
||||||
(concat " (as " content-type ")"))
|
(concat " (as " content-type ")"))
|
||||||
comment)))
|
comment)))
|
||||||
(setq button
|
(prog1 (insert-button
|
||||||
(insert-button
|
(concat "[ " base-label " ]")
|
||||||
(concat "[ " base-label " ]")
|
:base-label base-label
|
||||||
:base-label base-label
|
:type 'notmuch-show-part-button-type
|
||||||
:type 'notmuch-show-part-button-type
|
:notmuch-part-hidden nil)
|
||||||
:notmuch-part-hidden nil))
|
(insert "\n"))))
|
||||||
(insert "\n")
|
|
||||||
;; return button
|
|
||||||
button))
|
|
||||||
|
|
||||||
(defun notmuch-show-toggle-part-invisibility (&optional button)
|
(defun notmuch-show-toggle-part-invisibility (&optional button)
|
||||||
(interactive)
|
(interactive)
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
;;
|
;;
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
;;
|
|
||||||
|
|
||||||
;; Rstdoc provides a facility to extract all of the docstrings defined in
|
;; Rstdoc provides a facility to extract all of the docstrings defined in
|
||||||
;; an elisp source file. Usage:
|
;; an elisp source file. Usage:
|
||||||
|
@ -68,10 +67,10 @@
|
||||||
(insert "\n"))
|
(insert "\n"))
|
||||||
|
|
||||||
(defvar rst--escape-alist
|
(defvar rst--escape-alist
|
||||||
'( ("\\\\='" . "\\\\'")
|
'(("\\\\='" . "\\\\'")
|
||||||
("\\([^\\]\\)'" . "\\1`")
|
("\\([^\\]\\)'" . "\\1`")
|
||||||
("^[[:space:]\t]*$" . "|br|")
|
("^[[:space:]\t]*$" . "|br|")
|
||||||
("^[[:space:]\t]" . "|indent| "))
|
("^[[:space:]\t]" . "|indent| "))
|
||||||
"List of (regex . replacement) pairs.")
|
"List of (regex . replacement) pairs.")
|
||||||
|
|
||||||
(defun rstdoc--rst-quote-string (str)
|
(defun rstdoc--rst-quote-string (str)
|
||||||
|
|
|
@ -154,22 +154,21 @@ running, quit if it terminated."
|
||||||
|
|
||||||
(defun notmuch-test-expect-equal (output expected)
|
(defun notmuch-test-expect-equal (output expected)
|
||||||
"Compare OUTPUT with EXPECTED. Report any discrepencies."
|
"Compare OUTPUT with EXPECTED. Report any discrepencies."
|
||||||
(if (equal output expected)
|
(cond
|
||||||
t
|
((equal output expected)
|
||||||
(cond
|
t)
|
||||||
((and (listp output)
|
((and (listp output)
|
||||||
(listp expected))
|
(listp expected))
|
||||||
;; Reporting the difference between two lists is done by
|
;; Reporting the difference between two lists is done by
|
||||||
;; reporting differing elements of OUTPUT and EXPECTED
|
;; reporting differing elements of OUTPUT and EXPECTED
|
||||||
;; pairwise. This is expected to make analysis of failures
|
;; pairwise. This is expected to make analysis of failures
|
||||||
;; simpler.
|
;; simpler.
|
||||||
(apply #'concat (cl-loop for o in output
|
(apply #'concat (cl-loop for o in output
|
||||||
for e in expected
|
for e in expected
|
||||||
if (not (equal o e))
|
if (not (equal o e))
|
||||||
collect (notmuch-test-report-unexpected o e))))
|
collect (notmuch-test-report-unexpected o e))))
|
||||||
|
(t
|
||||||
(t
|
(notmuch-test-report-unexpected output expected))))
|
||||||
(notmuch-test-report-unexpected output expected)))))
|
|
||||||
|
|
||||||
(defun notmuch-post-command ()
|
(defun notmuch-post-command ()
|
||||||
(run-hooks 'post-command-hook))
|
(run-hooks 'post-command-hook))
|
||||||
|
|
Loading…
Add table
Reference in a new issue