summaryrefslogtreecommitdiff
path: root/mu4e
diff options
context:
space:
mode:
authordjcb <djcb@djcbsoftware.nl>2014-05-24 18:16:34 -0700
committerdjcb <djcb@djcbsoftware.nl>2014-05-24 18:16:34 -0700
commit2575e6b0a8da8c9c7e77cf2812862d99957dec82 (patch)
treed64bf1673686996a43678b72ad5e216dc57f3143 /mu4e
parentb30e06ad2ad1c43cb0c03b10b8a54ebdccea8500 (diff)
* mu4e: unbreak address display, removing toggling
Diffstat (limited to 'mu4e')
-rw-r--r--mu4e/mu4e-view.el39
1 files changed, 6 insertions, 33 deletions
diff --git a/mu4e/mu4e-view.el b/mu4e/mu4e-view.el
index 47f9570..8fb36ab 100644
--- a/mu4e/mu4e-view.el
+++ b/mu4e/mu4e-view.el
@@ -59,9 +59,7 @@ For the complete list of available headers, see `mu4e-header-info'."
(defcustom mu4e-view-show-addresses nil
"Whether to initially show full e-mail addresses for contacts in
-address fields, rather than only their names. Note that you can
-toggle between long/short display by klicking / M-RET on the
-contact."
+address fields, rather than only their names."
:type 'boolean
:group 'mu4e-view)
@@ -121,8 +119,6 @@ The first letter of NAME is used as a shortcut character.")
(defvar mu4e-view-contacts-header-keymap
(let ((map (make-sparse-keymap)))
- (define-key map [mouse-1] 'mu4e~view-toggle-contact)
- (define-key map [?\M-\r] 'mu4e~view-toggle-contact)
(define-key map [mouse-2] 'mu4e~view-compose-contact)
(define-key map "C" 'mu4e~view-compose-contact)
(define-key map "c" 'mu4e~view-copy-contact)
@@ -328,27 +324,7 @@ add text-properties to VAL."
(indent-to-column margin))))
(buffer-string))
"")))
-
-(defun* mu4e~view-toggle-contact (&optional point)
- "Toggle between the long and short versions of long/short string
-at POINT, or if nil, at (point)."
- (interactive)
- (unless (get-text-property (or point (point)) 'long)
- (return-from mu4e~view-toggle-contact))
- (let* ((point (or point (point)))
- ;; find the first pos part of the button
- (start (previous-property-change point))
- (start (if start (next-property-change start) (point-min)))
- ;; find the first pos not part of the button (possibly nil)
- (end (next-property-change point))
- (end (or end (1+ (point-max)))) ;; one beyond
- (longtext (get-text-property point 'long))
- (shorttext (get-text-property point 'short))
- (inhibit-read-only t))
- (if (string= (get-text-property point 'display) longtext)
- (add-text-properties start end `(display ,shorttext))
- (add-text-properties start end `(display ,longtext)))))
-
+
(defun mu4e~view-compose-contact (&optional point)
"Compose a message for the address at point."
(interactive)
@@ -377,19 +353,16 @@ at POINT, or if nil, at (point)."
(short (or name email)) ;; name may be nil
(long (if name (format "%s <%s>" name email) email)))
(propertize
- long
+ (if mu4e-view-show-addresses long short)
'long long
'short short
'email email
- 'display (if mu4e-view-show-addresses long short)
'keymap mu4e-view-contacts-header-keymap
'face 'mu4e-contact-face
'mouse-face 'highlight
- 'help-echo
- (format "<%s>\n%s\n%s" email
- "[mouse-1] or [M-RET] to toggle long/short display"
- "[mouse-2] or C to compose a mail for this recipient"))))
- (mu4e-message-field msg field) ", ") t))
+ 'help-echo (format "<%s>\n%s" email
+ "[mouse-2] or C to compose a mail for this recipient"))))
+ (mu4e-message-field msg field) ", ") t))
(defun mu4e~view-construct-flags-tags-header (field val)