mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 18:38:08 +01:00
emacs/*.el: changed one-char comment prefix ';' to two; ';;'
In order for emacs (indent-region) to (re)indent emacs lisp properly there needs to be at least 2 comment characters (;;).
This commit is contained in:
parent
85665a2955
commit
37dec7d7b3
4 changed files with 77 additions and 77 deletions
|
@ -402,8 +402,8 @@ Complete list of currently available key bindings:
|
||||||
"Run notmuch and display saved searches, known tags, etc."
|
"Run notmuch and display saved searches, known tags, etc."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
|
||||||
; Jump through a hoop to get this value from the deprecated variable
|
;; Jump through a hoop to get this value from the deprecated variable
|
||||||
; name (`notmuch-folders') or from the default value.
|
;; name (`notmuch-folders') or from the default value.
|
||||||
(unless notmuch-saved-searches
|
(unless notmuch-saved-searches
|
||||||
(setq notmuch-saved-searches (notmuch-saved-searches)))
|
(setq notmuch-saved-searches (notmuch-saved-searches)))
|
||||||
|
|
||||||
|
|
|
@ -148,14 +148,14 @@ the user hasn't set this variable with the old or new value."
|
||||||
(setq list (cdr list)))
|
(setq list (cdr list)))
|
||||||
(nreverse out)))
|
(nreverse out)))
|
||||||
|
|
||||||
; This lets us avoid compiling these replacement functions when emacs
|
;; This lets us avoid compiling these replacement functions when emacs
|
||||||
; is sufficiently new enough to supply them alone. We do the macro
|
;; is sufficiently new enough to supply them alone. We do the macro
|
||||||
; treatment rather than just wrapping our defun calls in a when form
|
;; treatment rather than just wrapping our defun calls in a when form
|
||||||
; specifically so that the compiler never sees the code on new emacs,
|
;; specifically so that the compiler never sees the code on new emacs,
|
||||||
; (since the code is triggering warnings that we don't know how to get
|
;; (since the code is triggering warnings that we don't know how to get
|
||||||
; rid of.
|
;; rid of.
|
||||||
;
|
;;
|
||||||
; A more clever macro here would accept a condition and a list of forms.
|
;; A more clever macro here would accept a condition and a list of forms.
|
||||||
(defmacro compile-on-emacs-prior-to-23 (form)
|
(defmacro compile-on-emacs-prior-to-23 (form)
|
||||||
"Conditionally evaluate form only on emacs < emacs-23."
|
"Conditionally evaluate form only on emacs < emacs-23."
|
||||||
(list 'when (< emacs-major-version 23)
|
(list 'when (< emacs-major-version 23)
|
||||||
|
|
|
@ -137,14 +137,14 @@ indentation."
|
||||||
"Use external viewers to view all attachments from the current message."
|
"Use external viewers to view all attachments from the current message."
|
||||||
(interactive)
|
(interactive)
|
||||||
(with-current-notmuch-show-message
|
(with-current-notmuch-show-message
|
||||||
; We override the mm-inline-media-tests to indicate which message
|
;; We override the mm-inline-media-tests to indicate which message
|
||||||
; parts are already sufficiently handled by the original
|
;; parts are already sufficiently handled by the original
|
||||||
; presentation of the message in notmuch-show mode. These parts
|
;; presentation of the message in notmuch-show mode. These parts
|
||||||
; will be inserted directly into the temporary buffer of
|
;; will be inserted directly into the temporary buffer of
|
||||||
; with-current-notmuch-show-message and silently discarded.
|
;; with-current-notmuch-show-message and silently discarded.
|
||||||
;
|
;;
|
||||||
; Any MIME part not explicitly mentioned here will be handled by an
|
;; Any MIME part not explicitly mentioned here will be handled by an
|
||||||
; external viewer as configured in the various mailcap files.
|
;; external viewer as configured in the various mailcap files.
|
||||||
(let ((mm-inline-media-tests '(
|
(let ((mm-inline-media-tests '(
|
||||||
("text/.*" ignore identity)
|
("text/.*" ignore identity)
|
||||||
("application/pgp-signature" ignore identity)
|
("application/pgp-signature" ignore identity)
|
||||||
|
|
118
emacs/notmuch.el
118
emacs/notmuch.el
|
@ -1,51 +1,51 @@
|
||||||
; notmuch.el --- run notmuch within emacs
|
;; notmuch.el --- run notmuch within emacs
|
||||||
;
|
;;
|
||||||
; Copyright © Carl Worth
|
;; Copyright © Carl Worth
|
||||||
;
|
;;
|
||||||
; This file is part of Notmuch.
|
;; This file is part of Notmuch.
|
||||||
;
|
;;
|
||||||
; Notmuch is free software: you can redistribute it and/or modify it
|
;; Notmuch is free software: you can redistribute it and/or modify it
|
||||||
; under the terms of the GNU General Public License as published by
|
;; under the terms of the GNU General Public License as published by
|
||||||
; the Free Software Foundation, either version 3 of the License, or
|
;; the Free Software Foundation, either version 3 of the License, or
|
||||||
; (at your option) any later version.
|
;; (at your option) any later version.
|
||||||
;
|
;;
|
||||||
; Notmuch is distributed in the hope that it will be useful, but
|
;; Notmuch is distributed in the hope that it will be useful, but
|
||||||
; WITHOUT ANY WARRANTY; without even the implied warranty of
|
;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
; General Public License for more details.
|
;; 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 Notmuch. If not, see <http://www.gnu.org/licenses/>.
|
;; along with Notmuch. If not, see <http://www.gnu.org/licenses/>.
|
||||||
;
|
;;
|
||||||
; Authors: Carl Worth <cworth@cworth.org>
|
;; Authors: Carl Worth <cworth@cworth.org>
|
||||||
|
|
||||||
; This is an emacs-based interface to the notmuch mail system.
|
;; This is an emacs-based interface to the notmuch mail system.
|
||||||
;
|
;;
|
||||||
; You will first need to have the notmuch program installed and have a
|
;; You will first need to have the notmuch program installed and have a
|
||||||
; notmuch database built in order to use this. See
|
;; notmuch database built in order to use this. See
|
||||||
; http://notmuchmail.org for details.
|
;; http://notmuchmail.org for details.
|
||||||
;
|
;;
|
||||||
; To install this software, copy it to a directory that is on the
|
;; To install this software, copy it to a directory that is on the
|
||||||
; `load-path' variable within emacs (a good candidate is
|
;; `load-path' variable within emacs (a good candidate is
|
||||||
; /usr/local/share/emacs/site-lisp). If you are viewing this from the
|
;; /usr/local/share/emacs/site-lisp). If you are viewing this from the
|
||||||
; notmuch source distribution then you can simply run:
|
;; notmuch source distribution then you can simply run:
|
||||||
;
|
;;
|
||||||
; sudo make install-emacs
|
;; sudo make install-emacs
|
||||||
;
|
;;
|
||||||
; to install it.
|
;; to install it.
|
||||||
;
|
;;
|
||||||
; Then, to actually run it, add:
|
;; Then, to actually run it, add:
|
||||||
;
|
;;
|
||||||
; (require 'notmuch)
|
;; (require 'notmuch)
|
||||||
;
|
;;
|
||||||
; to your ~/.emacs file, and then run "M-x notmuch" from within emacs,
|
;; to your ~/.emacs file, and then run "M-x notmuch" from within emacs,
|
||||||
; or run:
|
;; or run:
|
||||||
;
|
;;
|
||||||
; emacs -f notmuch
|
;; emacs -f notmuch
|
||||||
;
|
;;
|
||||||
; Have fun, and let us know if you have any comment, questions, or
|
;; Have fun, and let us know if you have any comment, questions, or
|
||||||
; kudos: Notmuch list <notmuch@notmuchmail.org> (subscription is not
|
;; kudos: Notmuch list <notmuch@notmuchmail.org> (subscription is not
|
||||||
; required, but is available from http://notmuchmail.org).
|
;; required, but is available from http://notmuchmail.org).
|
||||||
|
|
||||||
(eval-when-compile (require 'cl))
|
(eval-when-compile (require 'cl))
|
||||||
(require 'mm-view)
|
(require 'mm-view)
|
||||||
|
@ -139,10 +139,10 @@ This is basically just `format-kbd-macro' but we also convert ESC to M-."
|
||||||
"M-"
|
"M-"
|
||||||
(concat desc " "))))
|
(concat desc " "))))
|
||||||
|
|
||||||
; I would think that emacs would have code handy for walking a keymap
|
;; I would think that emacs would have code handy for walking a keymap
|
||||||
; and generating strings for each key, and I would prefer to just call
|
;; and generating strings for each key, and I would prefer to just call
|
||||||
; that. But I couldn't find any (could be all implemented in C I
|
;; that. But I couldn't find any (could be all implemented in C I
|
||||||
; suppose), so I wrote my own here.
|
;; suppose), so I wrote my own here.
|
||||||
(defun notmuch-substitute-one-command-key-with-prefix (prefix binding)
|
(defun notmuch-substitute-one-command-key-with-prefix (prefix binding)
|
||||||
"For a key binding, return a string showing a human-readable
|
"For a key binding, return a string showing a human-readable
|
||||||
representation of the prefixed key as well as the first line of
|
representation of the prefixed key as well as the first line of
|
||||||
|
@ -271,14 +271,14 @@ For a mouse binding, return nil."
|
||||||
(defun notmuch-search-scroll-down ()
|
(defun notmuch-search-scroll-down ()
|
||||||
"Move backward through the search results by one window's worth."
|
"Move backward through the search results by one window's worth."
|
||||||
(interactive)
|
(interactive)
|
||||||
; I don't know why scroll-down doesn't signal beginning-of-buffer
|
;; I don't know why scroll-down doesn't signal beginning-of-buffer
|
||||||
; the way that scroll-up signals end-of-buffer, but c'est la vie.
|
;; the way that scroll-up signals end-of-buffer, but c'est la vie.
|
||||||
;
|
;;
|
||||||
; So instead of trapping a signal we instead check whether the
|
;; So instead of trapping a signal we instead check whether the
|
||||||
; window begins on the first line of the buffer and if so, move
|
;; window begins on the first line of the buffer and if so, move
|
||||||
; directly to that position. (We have to count lines since the
|
;; directly to that position. (We have to count lines since the
|
||||||
; window-start position is not the same as point-min due to the
|
;; window-start position is not the same as point-min due to the
|
||||||
; invisible thread-ID characters on the first line.
|
;; invisible thread-ID characters on the first line.
|
||||||
(if (equal (count-lines (point-min) (window-start)) 0)
|
(if (equal (count-lines (point-min) (window-start)) 0)
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(scroll-down nil)))
|
(scroll-down nil)))
|
||||||
|
|
Loading…
Reference in a new issue