Merge pull request #1573 from tarsiiformes/cleanup

fix mu4e indentation
This commit is contained in:
Dirk-Jan C. Binnema
2020-02-17 20:54:10 +02:00
committed by GitHub
24 changed files with 3336 additions and 3342 deletions

2
.dir-locals.el Normal file
View File

@ -0,0 +1,2 @@
((emacs-lisp-mode
(indent-tabs-mode . nil)))

View File

@ -34,8 +34,3 @@ max_line_length = 100
indent_style = tab indent_style = tab
indent_size = 8 indent_size = 8
max_line_length = 100 max_line_length = 100
[*.el]
indent_style = space
indent_size = 2
max_line_length = 100

4
.gitignore vendored
View File

@ -49,6 +49,7 @@ GTAGS
*.gcda *.gcda
*.gcno *.gcno
*.trs *.trs
aminclude_static.am
elisp-comp elisp-comp
elc-stamp elc-stamp
dummy.cc dummy.cc
@ -94,6 +95,9 @@ build-aux/
/lib/parser/test-tokenizer /lib/parser/test-tokenizer
/lib/parser/test-utils /lib/parser/test-utils
/lib/parser/tokenize /lib/parser/tokenize
/lib/utils/test-command-parser
/lib/utils/test-mu-utils
/lib/utils/test-sexp-parser
*_flymake.* *_flymake.*
*_flymake_* *_flymake_*
/perf.data /perf.data

1
.mailmap Normal file
View File

@ -0,0 +1 @@
Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>

View File

@ -11,7 +11,7 @@ mu server \- the mu backend for the mu4e e-mail client
.SH DESCRIPTION .SH DESCRIPTION
\fBmu server\fR starts a simple shell in which one can query and manipulate the \fBmu server\fR starts a simple shell in which one can query and manipulate the
mu database. The output uses s-expressiong. \fBmu server\fR is not meant for use mu database. The output uses s-expressions. \fBmu server\fR is not meant for use
by humans, except for debugging purposes. Instead, it is designed specifically by humans, except for debugging purposes. Instead, it is designed specifically
for the \fBmu4e\fR e-mail client. for the \fBmu4e\fR e-mail client.
@ -30,7 +30,7 @@ For example, to view a certain message, the command would be:
.fi .fi
Parameters can be sent in any order; they must be of the correct type though. Parameters can be sent in any order; they must be of the correct type though.
See \fBlib/utils/mu-sexp-parser.hh\fR and \fBlib/utils/mu-sexp-parser.hh\fR in See \fBlib/utils/mu-sexp-parser.hh\fR and \fBlib/utils/mu-sexp-parser.cc\fR in
source-tree for the details. source-tree for the details.

View File

@ -296,14 +296,13 @@ messages can lead to messages with multiple tags headers.")
"List of tags for completion in `mu4e-action-retag-message'.") "List of tags for completion in `mu4e-action-retag-message'.")
(defun mu4e~contains-line-matching (regexp path) (defun mu4e~contains-line-matching (regexp path)
"Does file at PATH contain a line matching the given REGEXP?" "Return non-nil if the file at PATH contain a line matching REGEXP.
Otherwise return nil."
(with-temp-buffer (with-temp-buffer
(insert-file-contents path) (insert-file-contents path)
(save-excursion (save-excursion
(goto-char (point-min)) (goto-char (point-min))
(if (re-search-forward regexp nil t) (re-search-forward regexp nil t))))
t
nil))))
(defun mu4e~replace-first-line-matching (regexp to-string path) (defun mu4e~replace-first-line-matching (regexp to-string path)
"Replace first line matching REGEXP in PATH with TO-STRING." "Replace first line matching REGEXP in PATH with TO-STRING."

View File

@ -1,4 +1,4 @@
;; mu4e-compose.el -- part of mu4e, the mu mail user agent for emacs -*- lexical-binding: t -*- ;;; mu4e-compose.el -- part of mu4e, the mu mail user agent for emacs -*- lexical-binding: t -*-
;; ;;
;; Copyright (C) 2011-2020 Dirk-Jan C. Binnema ;; Copyright (C) 2011-2020 Dirk-Jan C. Binnema

View File

@ -1,4 +1,4 @@
; mu4e-context.el -- part of mu4e, the mu mail user agent -*- lexical-binding: t -*- ;;; mu4e-context.el -- part of mu4e, the mu mail user agent -*- lexical-binding: t -*-
;; ;;
;; Copyright (C) 2015-2020 Dirk-Jan C. Binnema ;; Copyright (C) 2015-2020 Dirk-Jan C. Binnema

View File

@ -1,4 +1,4 @@
;; mu4e-draft.el -- part of mu4e, the mu mail user agent for emacs -*- lexical-binding: t -*- ;;; mu4e-draft.el -- part of mu4e, the mu mail user agent for emacs -*- lexical-binding: t -*-
;; ;;
;; Copyright (C) 2011-2020 Dirk-Jan C. Binnema ;; Copyright (C) 2011-2020 Dirk-Jan C. Binnema

View File

@ -71,9 +71,8 @@
"Major mode for the mu4e main screen. "Major mode for the mu4e main screen.
\\{mu4e-main-mode-map}." \\{mu4e-main-mode-map}."
(use-local-map mu4e-main-mode-map) (use-local-map mu4e-main-mode-map)
(setq (setq truncate-lines t)
truncate-lines t (setq overwrite-mode 'overwrite-mode-binary)
overwrite-mode 'overwrite-mode-binary)
;; show context in mode-string ;; show context in mode-string
(make-local-variable 'global-mode-string) (make-local-variable 'global-mode-string)

View File

@ -1,4 +1,4 @@
;; mu4e-mark.el -- part of mu4e, the mu mail user agent -*- lexical-binding: t -*- ;;; mu4e-mark.el -- part of mu4e, the mu mail user agent -*- lexical-binding: t -*-
;; ;;
;; Copyright (C) 2011-2020 Dirk-Jan C. Binnema ;; Copyright (C) 2011-2020 Dirk-Jan C. Binnema

View File

@ -1,4 +1,5 @@
;;; mu4e-org -- Org-links to mu4e messages/queries -*- lexical-binding: t -*- ;;; mu4e-org -- Org-links to mu4e messages/queries -*- lexical-binding: t -*-
;;
;; Copyright (C) 2012-2020 Dirk-Jan C. Binnema ;; Copyright (C) 2012-2020 Dirk-Jan C. Binnema
;; Author: Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> ;; Author: Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>

View File

@ -1,4 +1,4 @@
;; mu4e-proc.el -- part of mu4e, the mu mail user agent -*- lexical-binding: t -*- ;;; mu4e-proc.el -- part of mu4e, the mu mail user agent -*- lexical-binding: t -*-
;; ;;
;; Copyright (C) 2011-2019 Dirk-Jan C. Binnema ;; Copyright (C) 2011-2019 Dirk-Jan C. Binnema
@ -30,6 +30,8 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; internal vars ;; internal vars
(defvar mu4e~proc-buf nil
"Buffer (string) for data received from the backend.")
(defconst mu4e~proc-name " *mu4e-proc*" (defconst mu4e~proc-name " *mu4e-proc*"
"Name of the server process, buffer.") "Name of the server process, buffer.")
(defvar mu4e~proc-process nil (defvar mu4e~proc-process nil
@ -47,18 +49,11 @@
"Regular expression matching the length cookie. "Regular expression matching the length cookie.
Match 1 will be the length (in hex).") Match 1 will be the length (in hex).")
(defvar mu4e~proc-buf nil
"Buffer (string) for data received from the backend.")
(defconst mu4e~proc-name " *mu4e-proc*"
"Name of the server process, buffer.")
(defvar mu4e~proc-process nil
"The mu-server process.")
(defun mu4e~proc-running-p () (defun mu4e~proc-running-p ()
"Whether the mu process is running." "Whether the mu process is running."
(when (and mu4e~proc-process (and mu4e~proc-process
(memq (process-status mu4e~proc-process) (memq (process-status mu4e~proc-process)
'(run open listen connect stop))) '(run open listen connect stop))
t)) t))
(defsubst mu4e~proc-eat-sexp-from-buf () (defsubst mu4e~proc-eat-sexp-from-buf ()
@ -94,7 +89,7 @@ removed."
(defun mu4e~proc-filter (_proc str) (defun mu4e~proc-filter (_proc str)
"Filter string STR from PROC. "Filter string STR from PROC.
This process the the 'mu server' output. It accumulates the This processes the 'mu server' output. It accumulates the
strings into valid sexps by checking of the ';;eox' `end-of-sexp' strings into valid sexps by checking of the ';;eox' `end-of-sexp'
marker, and then evaluating them. marker, and then evaluating them.

View File

@ -1,23 +1,23 @@
;;; mu4e-speedbar --- Speedbar support for mu4e -*- lexical-binding: t -*- ;;; mu4e-speedbar --- Speedbar support for mu4e -*- lexical-binding: t -*-
;; Copyright (C) 2012-2020 Antono Vasiljev, Dirk-Jan C. Binnema
;; ;;
;; Copyright (C) 2012-2020 Antono Vasiljev, Dirk-Jan C. Binnema
;; Author: Antono Vasiljev <self@antono.info> ;; Author: Antono Vasiljev <self@antono.info>
;; Version: 0.1 ;; Version: 0.1
;; Keywords: file, tags, tools ;; Keywords: file, tags, tools
;;
;; This file is not part of GNU Emacs. ;; This file is not part of GNU Emacs.
;; ;;
;; This program is free software; you can redistribute it and/or modify ;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by ;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option) ;; the Free Software Foundation; either version 3, or (at your option)
;; any later version. ;; any later version.
;;
;; This program is distributed in the hope that it will be useful, ;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details. ;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License ;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.

View File

@ -741,111 +741,111 @@ mu4e-compose-mode."
;; headers info ;; headers info
(defconst mu4e-header-info (defconst mu4e-header-info
'( (:attachments . '((:attachments
( :name "Attachments" . (:name "Attachments"
:shortname "Atts" :shortname "Atts"
:help "Message attachments" :help "Message attachments"
:require-full t :require-full t
:sortable nil)) :sortable nil))
(:bcc . (:bcc
( :name "Bcc" . (:name "Bcc"
:shortname "Bcc" :shortname "Bcc"
:help "Blind Carbon-Copy recipients for the message" :help "Blind Carbon-Copy recipients for the message"
:sortable t)) :sortable t))
(:cc . (:cc
( :name "Cc" . (:name "Cc"
:shortname "Cc" :shortname "Cc"
:help "Carbon-Copy recipients for the message" :help "Carbon-Copy recipients for the message"
:sortable t)) :sortable t))
(:date . (:date
( :name "Date" . (:name "Date"
:shortname "Date" :shortname "Date"
:help "Date/time when the message was written" :help "Date/time when the message was written"
:sortable t)) :sortable t))
(:human-date . (:human-date
( :name "Date" . (:name "Date"
:shortname "Date" :shortname "Date"
:help "Date/time when the message was written." :help "Date/time when the message was written."
:sortable :date)) :sortable :date))
(:flags . (:flags
( :name "Flags" . (:name "Flags"
:shortname "Flgs" :shortname "Flgs"
:help "Flags for the message" :help "Flags for the message"
:sortable nil)) :sortable nil))
(:from . (:from
( :name "From" . (:name "From"
:shortname "From" :shortname "From"
:help "The sender of the message" :help "The sender of the message"
:sortable t)) :sortable t))
(:from-or-to . (:from-or-to
( :name "From/To" . (:name "From/To"
:shortname "From/To" :shortname "From/To"
:help "Sender of the message if it's not me; otherwise the recipient" :help "Sender of the message if it's not me; otherwise the recipient"
:sortable nil)) :sortable nil))
(:maildir . (:maildir
( :name "Maildir" . (:name "Maildir"
:shortname "Maildir" :shortname "Maildir"
:help "Maildir for this message" :help "Maildir for this message"
:sortable t)) :sortable t))
(:list . (:list
( :name "List-Id" . (:name "List-Id"
:shortname "List" :shortname "List"
:help "Mailing list id for this message" :help "Mailing list id for this message"
:sortable t)) :sortable t))
(:mailing-list . (:mailing-list
( :name "List" . (:name "List"
:shortname "List" :shortname "List"
:help "Mailing list friendly name for this message" :help "Mailing list friendly name for this message"
:sortable :list)) :sortable :list))
(:message-id . (:message-id
( :name "Message-Id" . (:name "Message-Id"
:shortname "MsgID" :shortname "MsgID"
:help "Message-Id for this message" :help "Message-Id for this message"
:sortable nil)) :sortable nil))
(:path . (:path
( :name "Path" . (:name "Path"
:shortname "Path" :shortname "Path"
:help "Full filesystem path to the message" :help "Full filesystem path to the message"
:sortable t)) :sortable t))
(:signature . (:signature
( :name "Signature" . (:name "Signature"
:shortname "Sgn" :shortname "Sgn"
:help "Check for the cryptographic signature" :help "Check for the cryptographic signature"
:require-full t :require-full t
:sortable nil)) :sortable nil))
(:decryption . (:decryption
( :name "Decryption" . (:name "Decryption"
:shortname "Dec" :shortname "Dec"
:help "Check the cryptographic decryption status" :help "Check the cryptographic decryption status"
:require-full t :require-full t
:sortable nil)) :sortable nil))
(:size . (:size
( :name "Size" . (:name "Size"
:shortname "Size" :shortname "Size"
:help "Size of the message" :help "Size of the message"
:sortable t)) :sortable t))
(:subject . (:subject
( :name "Subject" . (:name "Subject"
:shortname "Subject" :shortname "Subject"
:help "Subject of the message" :help "Subject of the message"
:sortable t)) :sortable t))
(:tags . (:tags
( :name "Tags" . (:name "Tags"
:shortname "Tags" :shortname "Tags"
:help "Tags for the message" :help "Tags for the message"
:sortable nil)) :sortable nil))
(:thread-subject . (:thread-subject
( :name "Subject" . (:name "Subject"
:shortname "Subject" :shortname "Subject"
:help "Subject of the thread" :help "Subject of the thread"
:sortable :subject)) :sortable :subject))
(:to . (:to
( :name "To" . (:name "To"
:shortname "To" :shortname "To"
:help "Recipient of the message" :help "Recipient of the message"
:sortable t)) :sortable t))
(:user-agent . (:user-agent
( :name "User-Agent" . (:name "User-Agent"
:shortname "UA" :shortname "UA"
:help "Program used for writing this message" :help "Program used for writing this message"
:require-full t :require-full t
@ -897,7 +897,7 @@ argument, and returns a string. See the default value of
(defconst mu4e~headers-buffer-name "*mu4e-headers*" (defconst mu4e~headers-buffer-name "*mu4e-headers*"
"Name of the buffer for message headers.") "Name of the buffer for message headers.")
; view ;; view
(defconst mu4e~view-buffer-name "*mu4e-view*" (defconst mu4e~view-buffer-name "*mu4e-view*"
"Name for the message view buffer.") "Name for the message view buffer.")

View File

@ -905,12 +905,12 @@ FUNC should be a function taking two arguments:
"Define the major-mode for the mu4e-view." "Define the major-mode for the mu4e-view."
(if mu4e-view-use-gnus (if mu4e-view-use-gnus
(define-derived-mode mu4e-view-mode gnus-article-mode "mu4e:view" (define-derived-mode mu4e-view-mode gnus-article-mode "mu4e:view"
"Major mode for viewing an e-mail message in mu4e, based on
Gnus' article-mode."
;; remove some gnus stuff that does not apply ;; remove some gnus stuff that does not apply
(define-key mu4e-view-mode-map [menu-bar Treatment] nil) (define-key mu4e-view-mode-map [menu-bar Treatment] nil)
(define-key mu4e-view-mode-map [menu-bar Article] nil) (define-key mu4e-view-mode-map [menu-bar Article] nil)
(define-key mu4e-view-mode-map [menu-bar post] nil) (define-key mu4e-view-mode-map [menu-bar post] nil)
"Major mode for viewing an e-mail message in mu4e, based on
Gnus' article-mode."
(setq mu4e~view-buffer-name gnus-article-buffer) (setq mu4e~view-buffer-name gnus-article-buffer)
(mu4e~view-mode-body)) (mu4e~view-mode-body))
(define-derived-mode mu4e-view-mode special-mode "mu4e:view" (define-derived-mode mu4e-view-mode special-mode "mu4e:view"
@ -1572,7 +1572,6 @@ URLs. The urls are fetched to `mu4e-attachment-dir'."
(defun mu4e~view-handle-urls (prompt multi urlfunc) (defun mu4e~view-handle-urls (prompt multi urlfunc)
"If MULTI is nil, apply URLFUNC to a single uri, otherwise, apply "If MULTI is nil, apply URLFUNC to a single uri, otherwise, apply
it to a range of uris. PROMPT is the query to present to the user." it to a range of uris. PROMPT is the query to present to the user."
(interactive "P")
(if multi (if multi
(mu4e~view-handle-multi-urls prompt urlfunc) (mu4e~view-handle-multi-urls prompt urlfunc)
(mu4e~view-handle-single-url prompt urlfunc))) (mu4e~view-handle-single-url prompt urlfunc)))
@ -1580,7 +1579,6 @@ it to a range of uris. PROMPT is the query to present to the user."
(defun mu4e~view-handle-single-url (prompt urlfunc &optional num) (defun mu4e~view-handle-single-url (prompt urlfunc &optional num)
"Apply URLFUNC to url NUM in the current message, prompting the "Apply URLFUNC to url NUM in the current message, prompting the
user with PROMPT." user with PROMPT."
(interactive)
(let* ((num (or num (mu4e~view-get-urls-num prompt))) (let* ((num (or num (mu4e~view-get-urls-num prompt)))
(url (gethash num mu4e~view-link-map))) (url (gethash num mu4e~view-link-map)))
(unless url (mu4e-warn "Invalid number for URL")) (unless url (mu4e-warn "Invalid number for URL"))
@ -1596,7 +1594,6 @@ of urls. You can type multiple values separated by space, e.g. 1
Furthermore, there is a shortcut \"a\" which means all urls, but as Furthermore, there is a shortcut \"a\" which means all urls, but as
this is the default, you may not need it." this is the default, you may not need it."
(interactive)
(let* ((linkstr (mu4e~view-get-urls-num (let* ((linkstr (mu4e~view-get-urls-num
"URL number range (or 'a' for 'all')" t)) "URL number range (or 'a' for 'all')" t))
(count (hash-table-count mu4e~view-link-map)) (count (hash-table-count mu4e~view-link-map))

View File

@ -2864,8 +2864,8 @@ edited. When you compose a totally new message, the @var{msg} parameter is
@node Actions @node Actions
@chapter Actions @chapter Actions
@t{mu4e} lets you define custom actions for messages in the @ref{Headers view} @t{mu4e} lets you define custom actions for messages in @ref{Headers view}
and for both messages and attachments in the @ref{Message view}. Custom and for both messages and attachments in @ref{Message view}. Custom
actions allow you to easily extend @t{mu4e} for specific needs --- for example, actions allow you to easily extend @t{mu4e} for specific needs --- for example,
marking messages as spam in a spam filter or applying an attachment with a marking messages as spam in a spam filter or applying an attachment with a
source code patch. source code patch.

View File

@ -1,6 +1,4 @@
;;; org-mu4e -- Support for links to mu4e messages/queries from within -*- lexical-binding: t -*- ;;; org-mu4e -- support for links to mu4e messages and writing org-mode messages -*- lexical-binding: t -*-
;;; org-mode, and for writing message in org-mode, sending them as
;;; rich-text
;; ;;
;; Copyright (C) 2012-2019 Dirk-Jan C. Binnema ;; Copyright (C) 2012-2019 Dirk-Jan C. Binnema
@ -26,6 +24,9 @@
;;; Commentary: ;;; Commentary:
;; Support for links to mu4e messages/queries from within org-mode,
;; and for writing message in org-mode, sending them as rich-text.
;;; Code: ;;; Code:
;; The expect version here is org 8.x ;; The expect version here is org 8.x