Re: [PATCH 03/23] emacs: Fix indentation

2020-08-01 Thread Jonas Bernoulli
Tomi Ollila  writes:

> On Sun, Jul 26 2020, Jonas Bernoulli wrote:

>> @@ -473,7 +473,7 @@ (defun notmuch-mua-new-forward-messages (messages 
>> &optional prompt-for-sender)
>>(when (or prompt-for-sender notmuch-always-prompt-for-sender)
>>  (list (cons 'From (notmuch-mua-prompt-for-sender)
>>   forward-subject  ;; Comes from the first message and is
>> -  ;; applied later.
>> + ;; applied later.
>
> Otherwise looks good (I think), but this change above... the indentation
> emacs does not work here. perhaps appending this 'applied later' to the end
> of previous line (even fits onto 80 columns, unlike the next comment...

I think we should fix that next comment and handle all three nearby
comments consistently, i.e.:

diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
--- a/emacs/notmuch-mua.el
+++ b/emacs/notmuch-mua.el
@@ -476,10 +476,12 @@ (defun notmuch-mua-new-forward-messages (messages 
&optional prompt-for-sender)
   (let* ((other-headers
  (and (or prompt-for-sender notmuch-always-prompt-for-sender)
   (list (cons 'From (notmuch-mua-prompt-for-sender)
-forward-subject  ;; Comes from the first message and is
- ;; applied later.
-forward-references ;; List of accumulated message-references of 
forwarded messages
-forward-queries) ;; List of corresponding message-query
+;; Comes from the first message and is applied later.
+forward-subject
+;; List of accumulated message-references of forwarded messages.
+forward-references
+;; List of corresponding message-query.
+forward-queries)
 ;; Generate the template for the outgoing message.
 (notmuch-mua-mail nil "" other-headers nil 
(notmuch-mua-get-switch-function))
 (save-excursion
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: [PATCH 03/23] emacs: Fix indentation

2020-07-30 Thread Tomi Ollila
On Sun, Jul 26 2020, Jonas Bernoulli wrote:

> ---
>  emacs/coolj.el |  16 ++---
>  emacs/notmuch-address.el   |  18 +++---
>  emacs/notmuch-compat.el|  86 -
>  emacs/notmuch-draft.el |  18 +++---
>  emacs/notmuch-hello.el |  24 +++
>  emacs/notmuch-lib.el   |  56 -
>  emacs/notmuch-maildir-fcc.el   |  58 -
>  emacs/notmuch-mua.el   |  34 +-
>  emacs/notmuch-query.el |   6 +-
>  emacs/notmuch-show.el  | 111 +
>  emacs/notmuch-tag.el   |   4 +-
>  emacs/notmuch-tree.el  | 102 +++---
>  emacs/notmuch-wash.el  |   2 +-
>  emacs/notmuch.el   |  76 +++---
>  test/emacs-address-cleaning.el |   2 +-
>  15 files changed, 307 insertions(+), 306 deletions(-)
>
> diff --git a/emacs/coolj.el b/emacs/coolj.el
> index 5d311170..961db606 100644
> --- a/emacs/coolj.el
> +++ b/emacs/coolj.el
> @@ -108,11 +108,11 @@ (defun coolj-set-breakpoint (prefix)
>  line."
>(move-to-column fill-column)
>(if (and (re-search-forward "[^ ]" (line-end-position) 1)
> -   (> (current-column) fill-column))
> +(> (current-column) fill-column))
>;; This line is too long.  Can we break it?
>(or (coolj-find-break-backward prefix)
> -  (progn (move-to-column fill-column)
> - (coolj-find-break-forward)
> +   (progn (move-to-column fill-column)
> +  (coolj-find-break-forward)
>  
>  (defun coolj-find-break-backward (prefix)
>"Move point backward to the first available breakpoint and return t.
> @@ -135,12 +135,12 @@ (defun coolj-find-break-forward ()
>  If no break point is found, return nil."
>(and (search-forward " " (line-end-position) 1)
> (progn (skip-chars-forward " " (line-end-position))
> -  (null (eolp)))
> +   (null (eolp)))
> (if (and fill-nobreak-predicate
> -(run-hook-with-args-until-success
> - 'fill-nobreak-predicate))
> -   (coolj-find-break-forward)
> - t)))
> + (run-hook-with-args-until-success
> +  'fill-nobreak-predicate))
> +(coolj-find-break-forward)
> +  t)))
>  
>  (provide 'coolj)
>  
> diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el
> index ca4da3f3..09dda247 100644
> --- a/emacs/notmuch-address.el
> +++ b/emacs/notmuch-address.el
> @@ -153,14 +153,14 @@ (defcustom notmuch-address-use-company t
>  
>  (defun notmuch-address-setup ()
>(let* ((setup-company (and notmuch-address-use-company
> -(require 'company nil t)))
> +  (require 'company nil t)))
>(pair (cons notmuch-address-completion-headers-regexp
> -#'notmuch-address-expand-name)))
> -  (when setup-company
> - (notmuch-company-setup))
> -  (unless (member pair message-completion-alist)
> - (setq message-completion-alist
> -   (push pair message-completion-alist)
> +  #'notmuch-address-expand-name)))
> +(when setup-company
> +  (notmuch-company-setup))
> +(unless (member pair message-completion-alist)
> +  (setq message-completion-alist
> + (push pair message-completion-alist)
>  
>  (defun notmuch-address-toggle-internal-completion ()
>"Toggle use of internal completion for current buffer.
> @@ -323,7 +323,7 @@ (defun notmuch-address-harvest (&optional addr-prefix 
> synchronous callback)
>,query)))
>  (if synchronous
>   (mapc #'notmuch-address-harvest-addr
> -(apply 'notmuch-call-notmuch-sexp args))
> +   (apply 'notmuch-call-notmuch-sexp args))
>;; Asynchronous
>(let* ((current-proc (if addr-prefix
>  (car notmuch-address-harvest-procs)
> @@ -390,7 +390,7 @@ (defun notmuch-address--load-address-hash ()
>  (defun notmuch-address--save-address-hash ()
>(when notmuch-address-save-filename
>  (if (or (not (file-exists-p notmuch-address-save-filename))
> -   ;; The file exists, check it is a file we saved
> + ;; The file exists, check it is a file we saved
>   (notmuch-address--get-address-hash))
>   (with-temp-file notmuch-address-save-filename
> (let ((save-plist
> diff --git a/emacs/notmuch-compat.el b/emacs/notmuch-compat.el
> index 2cedd39d..388ef70f 100644
> --- a/emacs/notmuch-compat.el
> +++ b/emacs/notmuch-compat.el
> @@ -35,7 +35,7 @@ (if (fboundp 'setq-local)
>  (if (fboundp 'read-char-choice)
>  (defalias 'notmuch-read-char-choice 'read-char-choice)
>(defun notmuch-read-char-choice (prompt chars &optional 
> inhibit-keyboard-quit)
> -  "Read and return one of CHARS, prompting for PROMPT.
> +"Read and return one of CHARS, prompting for PROMPT.
>  Any input that is not 

[PATCH 03/23] emacs: Fix indentation

2020-07-26 Thread Jonas Bernoulli
---
 emacs/coolj.el |  16 ++---
 emacs/notmuch-address.el   |  18 +++---
 emacs/notmuch-compat.el|  86 -
 emacs/notmuch-draft.el |  18 +++---
 emacs/notmuch-hello.el |  24 +++
 emacs/notmuch-lib.el   |  56 -
 emacs/notmuch-maildir-fcc.el   |  58 -
 emacs/notmuch-mua.el   |  34 +-
 emacs/notmuch-query.el |   6 +-
 emacs/notmuch-show.el  | 111 +
 emacs/notmuch-tag.el   |   4 +-
 emacs/notmuch-tree.el  | 102 +++---
 emacs/notmuch-wash.el  |   2 +-
 emacs/notmuch.el   |  76 +++---
 test/emacs-address-cleaning.el |   2 +-
 15 files changed, 307 insertions(+), 306 deletions(-)

diff --git a/emacs/coolj.el b/emacs/coolj.el
index 5d311170..961db606 100644
--- a/emacs/coolj.el
+++ b/emacs/coolj.el
@@ -108,11 +108,11 @@ (defun coolj-set-breakpoint (prefix)
 line."
   (move-to-column fill-column)
   (if (and (re-search-forward "[^ ]" (line-end-position) 1)
-   (> (current-column) fill-column))
+  (> (current-column) fill-column))
   ;; This line is too long.  Can we break it?
   (or (coolj-find-break-backward prefix)
-  (progn (move-to-column fill-column)
- (coolj-find-break-forward)
+ (progn (move-to-column fill-column)
+(coolj-find-break-forward)
 
 (defun coolj-find-break-backward (prefix)
   "Move point backward to the first available breakpoint and return t.
@@ -135,12 +135,12 @@ (defun coolj-find-break-forward ()
 If no break point is found, return nil."
   (and (search-forward " " (line-end-position) 1)
(progn (skip-chars-forward " " (line-end-position))
-  (null (eolp)))
+ (null (eolp)))
(if (and fill-nobreak-predicate
-(run-hook-with-args-until-success
- 'fill-nobreak-predicate))
-   (coolj-find-break-forward)
- t)))
+   (run-hook-with-args-until-success
+'fill-nobreak-predicate))
+  (coolj-find-break-forward)
+t)))
 
 (provide 'coolj)
 
diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el
index ca4da3f3..09dda247 100644
--- a/emacs/notmuch-address.el
+++ b/emacs/notmuch-address.el
@@ -153,14 +153,14 @@ (defcustom notmuch-address-use-company t
 
 (defun notmuch-address-setup ()
   (let* ((setup-company (and notmuch-address-use-company
-  (require 'company nil t)))
+(require 'company nil t)))
 (pair (cons notmuch-address-completion-headers-regexp
-  #'notmuch-address-expand-name)))
-  (when setup-company
-   (notmuch-company-setup))
-  (unless (member pair message-completion-alist)
-   (setq message-completion-alist
- (push pair message-completion-alist)
+#'notmuch-address-expand-name)))
+(when setup-company
+  (notmuch-company-setup))
+(unless (member pair message-completion-alist)
+  (setq message-completion-alist
+   (push pair message-completion-alist)
 
 (defun notmuch-address-toggle-internal-completion ()
   "Toggle use of internal completion for current buffer.
@@ -323,7 +323,7 @@ (defun notmuch-address-harvest (&optional addr-prefix 
synchronous callback)
 ,query)))
 (if synchronous
(mapc #'notmuch-address-harvest-addr
-  (apply 'notmuch-call-notmuch-sexp args))
+ (apply 'notmuch-call-notmuch-sexp args))
   ;; Asynchronous
   (let* ((current-proc (if addr-prefix
   (car notmuch-address-harvest-procs)
@@ -390,7 +390,7 @@ (defun notmuch-address--load-address-hash ()
 (defun notmuch-address--save-address-hash ()
   (when notmuch-address-save-filename
 (if (or (not (file-exists-p notmuch-address-save-filename))
- ;; The file exists, check it is a file we saved
+   ;; The file exists, check it is a file we saved
(notmuch-address--get-address-hash))
(with-temp-file notmuch-address-save-filename
  (let ((save-plist
diff --git a/emacs/notmuch-compat.el b/emacs/notmuch-compat.el
index 2cedd39d..388ef70f 100644
--- a/emacs/notmuch-compat.el
+++ b/emacs/notmuch-compat.el
@@ -35,7 +35,7 @@ (if (fboundp 'setq-local)
 (if (fboundp 'read-char-choice)
 (defalias 'notmuch-read-char-choice 'read-char-choice)
   (defun notmuch-read-char-choice (prompt chars &optional 
inhibit-keyboard-quit)
-  "Read and return one of CHARS, prompting for PROMPT.
+"Read and return one of CHARS, prompting for PROMPT.
 Any input that is not one of CHARS is ignored.
 
 If optional argument INHIBIT-KEYBOARD-QUIT is non-nil, ignore
@@ -44,49 +44,49 @@ (if (fboundp 'read-char-choice)
 This is an exact copy of this function from emacs 24 for use on
 emacs