]> git.notmuchmail.org Git - notmuch/blob - emacs/notmuch-lib.el
emacs/notmuch-show.el: Part headers are real buttons that save the part
[notmuch] / emacs / notmuch-lib.el
1 ;; notmuch-lib.el --- common variables, functions and function declarations
2 ;;
3 ;; Copyright © Carl Worth
4 ;;
5 ;; This file is part of Notmuch.
6 ;;
7 ;; Notmuch is free software: you can redistribute it and/or modify it
8 ;; under the terms of the GNU General Public License as published by
9 ;; the Free Software Foundation, either version 3 of the License, or
10 ;; (at your option) any later version.
11 ;;
12 ;; Notmuch is distributed in the hope that it will be useful, but
13 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 ;; General Public License for more details.
16 ;;
17 ;; You should have received a copy of the GNU General Public License
18 ;; along with Notmuch.  If not, see <http://www.gnu.org/licenses/>.
19 ;;
20 ;; Authors: Carl Worth <cworth@cworth.org>
21
22 ;; This is an part of an emacs-based interface to the notmuch mail system.
23
24 (defvar notmuch-command "notmuch"
25   "Command to run the notmuch binary.")
26
27 ;; XXX: This should be a generic function in emacs somewhere, not
28 ;; here.
29 (defun point-invisible-p ()
30   "Return whether the character at point is invisible.
31
32 Here visibility is determined by `buffer-invisibility-spec' and
33 the invisible property of any overlays for point. It doesn't have
34 anything to do with whether point is currently being displayed
35 within the current window."
36   (let ((prop (get-char-property (point) 'invisible)))
37     (if (eq buffer-invisibility-spec t)
38         prop
39       (or (memq prop buffer-invisibility-spec)
40           (assq prop buffer-invisibility-spec)))))
41
42 (provide 'notmuch-lib)