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_size = 8
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
*.gcno
*.trs
aminclude_static.am
elisp-comp
elc-stamp
dummy.cc
@ -94,6 +95,9 @@ build-aux/
/lib/parser/test-tokenizer
/lib/parser/test-utils
/lib/parser/tokenize
/lib/utils/test-command-parser
/lib/utils/test-mu-utils
/lib/utils/test-sexp-parser
*_flymake.*
*_flymake_*
/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
\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
for the \fBmu4e\fR e-mail client.
@ -30,7 +30,7 @@ For example, to view a certain message, the command would be:
.fi
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.

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'.")
(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
(insert-file-contents path)
(save-excursion
(goto-char (point-min))
(if (re-search-forward regexp nil t)
t
nil))))
(re-search-forward regexp nil t))))
(defun mu4e~replace-first-line-matching (regexp to-string path)
"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

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

View File

@ -132,7 +132,7 @@ For example for bogofile, use \"/usr/bin/bogofilter -Sn < %s\"")
(let* ((path (shell-quote-argument (mu4e-message-field msg :path)))
(command (format mu4e-register-as-spam-cmd path))) ;; re-register msg as spam
(shell-command command))
(mu4e-mark-at-point 'delete nil))
(mu4e-mark-at-point 'delete nil))
(defun mu4e-register-msg-as-ham (msg)
"Mark message as ham."
@ -140,7 +140,7 @@ For example for bogofile, use \"/usr/bin/bogofilter -Sn < %s\"")
(let* ((path (shell-quote-argument(mu4e-message-field msg :path)))
(command (format mu4e-register-as-ham-cmd path))) ;; re-register msg as ham
(shell-command command))
(mu4e-mark-at-point 'something nil))
(mu4e-mark-at-point 'something nil))
;; (add-to-list 'mu4e-view-actions
;; '("sMark as spam" . mu4e-view-register-msg-as-spam) t)
@ -205,7 +205,7 @@ buffers found, compose a new message and then attach the file."
;; if buffer was found, set buffer to destination buffer, and attach files
(if (not (eq destination 'nil))
(progn (set-buffer destination)
(goto-char (point-max)) ;attach at end of buffer
(goto-char (point-max)) ; attach at end of buffer
(while files-to-attach
(mml-attach-file (car files-to-attach)
(or (mm-default-file-encoding (car files-to-attach))

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

View File

@ -71,9 +71,8 @@
"Major mode for the mu4e main screen.
\\{mu4e-main-mode-map}."
(use-local-map mu4e-main-mode-map)
(setq
truncate-lines t
overwrite-mode 'overwrite-mode-binary)
(setq truncate-lines t)
(setq overwrite-mode 'overwrite-mode-binary)
;; show context in 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

View File

@ -1,4 +1,5 @@
;;; mu4e-org -- Org-links to mu4e messages/queries -*- lexical-binding: t -*-
;;
;; Copyright (C) 2012-2020 Dirk-Jan C. Binnema
;; 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
@ -30,7 +30,9 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; internal vars
(defconst mu4e~proc-name "*mu4e-proc*"
(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.")
@ -47,18 +49,11 @@
"Regular expression matching the length cookie.
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 ()
"Whether the mu process is running."
(when (and mu4e~proc-process
(and mu4e~proc-process
(memq (process-status mu4e~proc-process)
'(run open listen connect stop)))
'(run open listen connect stop))
t))
(defsubst mu4e~proc-eat-sexp-from-buf ()
@ -94,7 +89,7 @@ removed."
(defun mu4e~proc-filter (_proc str)
"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'
marker, and then evaluating them.

View File

@ -1,23 +1,23 @@
;;; 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>
;; Version: 0.1
;; Keywords: file, tags, tools
;;
;; This file is not part of GNU Emacs.
;;
;; 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
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.

View File

@ -103,7 +103,7 @@ corresponding message file in the filesystem.
Having this option as t ensures that no non-existing messages are
shown but can also be quite slow with large message stores."
:type 'boolean :group 'mu4e :safe 'booleanp)
:type 'boolean :group 'mu4e :safe 'booleanp)
(defcustom mu4e-index-lazy-check nil
"Whether to only use a 'lazy check' during reindexing.
@ -434,7 +434,7 @@ Useful when this is not equal to the From: address."
;; backward compatibility
(make-obsolete-variable 'mu4e-reply-to-address
'mu4e-compose-reply-to-address
'mu4e-compose-reply-to-address
"v0.9.9")
(defcustom mu4e-compose-keep-self-cc nil
@ -741,111 +741,111 @@ mu4e-compose-mode."
;; headers info
(defconst mu4e-header-info
'( (:attachments .
( :name "Attachments"
'((:attachments
. (:name "Attachments"
:shortname "Atts"
:help "Message attachments"
:require-full t
:sortable nil))
(:bcc .
( :name "Bcc"
(:bcc
. (:name "Bcc"
:shortname "Bcc"
:help "Blind Carbon-Copy recipients for the message"
:sortable t))
(:cc .
( :name "Cc"
(:cc
. (:name "Cc"
:shortname "Cc"
:help "Carbon-Copy recipients for the message"
:sortable t))
(:date .
( :name "Date"
(:date
. (:name "Date"
:shortname "Date"
:help "Date/time when the message was written"
:sortable t))
(:human-date .
( :name "Date"
(:human-date
. (:name "Date"
:shortname "Date"
:help "Date/time when the message was written."
:sortable :date))
(:flags .
( :name "Flags"
(:flags
. (:name "Flags"
:shortname "Flgs"
:help "Flags for the message"
:sortable nil))
(:from .
( :name "From"
(:from
. (:name "From"
:shortname "From"
:help "The sender of the message"
:sortable t))
(:from-or-to .
( :name "From/To"
(:from-or-to
. (:name "From/To"
:shortname "From/To"
:help "Sender of the message if it's not me; otherwise the recipient"
:sortable nil))
(:maildir .
( :name "Maildir"
(:maildir
. (:name "Maildir"
:shortname "Maildir"
:help "Maildir for this message"
:sortable t))
(:list .
( :name "List-Id"
(:list
. (:name "List-Id"
:shortname "List"
:help "Mailing list id for this message"
:sortable t))
(:mailing-list .
( :name "List"
(:mailing-list
. (:name "List"
:shortname "List"
:help "Mailing list friendly name for this message"
:sortable :list))
(:message-id .
( :name "Message-Id"
(:message-id
. (:name "Message-Id"
:shortname "MsgID"
:help "Message-Id for this message"
:sortable nil))
(:path .
( :name "Path"
(:path
. (:name "Path"
:shortname "Path"
:help "Full filesystem path to the message"
:sortable t))
(:signature .
( :name "Signature"
(:signature
. (:name "Signature"
:shortname "Sgn"
:help "Check for the cryptographic signature"
:require-full t
:sortable nil))
(:decryption .
( :name "Decryption"
(:decryption
. (:name "Decryption"
:shortname "Dec"
:help "Check the cryptographic decryption status"
:require-full t
:sortable nil))
(:size .
( :name "Size"
(:size
. (:name "Size"
:shortname "Size"
:help "Size of the message"
:sortable t))
(:subject .
( :name "Subject"
(:subject
. (:name "Subject"
:shortname "Subject"
:help "Subject of the message"
:sortable t))
(:tags .
( :name "Tags"
(:tags
. (:name "Tags"
:shortname "Tags"
:help "Tags for the message"
:sortable nil))
(:thread-subject .
( :name "Subject"
(:thread-subject
. (:name "Subject"
:shortname "Subject"
:help "Subject of the thread"
:sortable :subject))
(:to .
( :name "To"
(:to
. (:name "To"
:shortname "To"
:help "Recipient of the message"
:sortable t))
(:user-agent .
( :name "User-Agent"
(:user-agent
. (:name "User-Agent"
:shortname "UA"
:help "Program used for writing this message"
:require-full t
@ -881,7 +881,7 @@ Note, `:sortable' is not supported for custom header fields.")
(format "%d"
(+ (length (mu4e-message-field msg :to))
(length (mu4e-message-field msg :cc))))))))
"A list of custom (user-defined) headers.
"A list of custom (user-defined) headers.
The format is similar
to `mu4e-header-info', but adds a :function property, which
should point to a function that takes a message p-list as
@ -897,7 +897,7 @@ argument, and returns a string. See the default value of
(defconst mu4e~headers-buffer-name "*mu4e-headers*"
"Name of the buffer for message headers.")
; view
;; view
(defconst mu4e~view-buffer-name "*mu4e-view*"
"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."
(if mu4e-view-use-gnus
(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
(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 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)
(mu4e~view-mode-body))
(define-derived-mode mu4e-view-mode special-mode "mu4e:view"
@ -1069,7 +1069,7 @@ return nil."
(mu4e-headers-view-message)))
(defun mu4e-view-headers-prev-unread ()
"Move point to the previous unread message header in the headers
"Move point to the previous unread message header in the headers
buffer connected with this message view. If this succeeds, return
the new docid. Otherwise, return nil."
(interactive)
@ -1572,7 +1572,6 @@ URLs. The urls are fetched to `mu4e-attachment-dir'."
(defun mu4e~view-handle-urls (prompt multi urlfunc)
"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."
(interactive "P")
(if multi
(mu4e~view-handle-multi-urls 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)
"Apply URLFUNC to url NUM in the current message, prompting the
user with PROMPT."
(interactive)
(let* ((num (or num (mu4e~view-get-urls-num prompt)))
(url (gethash num mu4e~view-link-map)))
(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
this is the default, you may not need it."
(interactive)
(let* ((linkstr (mu4e~view-get-urls-num
"URL number range (or 'a' for 'all')" t))
(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
@chapter Actions
@t{mu4e} lets you define custom actions for messages in the @ref{Headers view}
and for both messages and attachments in the @ref{Message view}. Custom
@t{mu4e} lets you define custom actions for messages in @ref{Headers view}
and for both messages and attachments in @ref{Message view}. Custom
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
source code patch.
@ -2891,7 +2891,7 @@ Defining a new custom action comes down to writing an elisp-function to do the
work. Functions that operate on messages receive a @var{msg} parameter, which
corresponds to the message at point. Something like:
@lisp
(defun my-action-func (msg)
(defun my-action-func (msg)
"Describe my message function."
;; do stuff
)
@ -2903,7 +2903,7 @@ corresponds to the message at point, and an @var{attachment-num}, which is the
number of the attachment as seen in the message view. An attachment function
looks like:
@lisp
(defun my-attachment-action-func (msg attachment-num)
(defun my-attachment-action-func (msg attachment-num)
"Describe my attachment function."
;; do stuff
)

View File

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