[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ebdb f07cadf 1/7: Exclude full formatter from `ebdb-ava

From: Eric Abrahamsen
Subject: [elpa] externals/ebdb f07cadf 1/7: Exclude full formatter from `ebdb-available-ebdb-formatters'
Date: Fri, 14 Dec 2018 15:44:20 -0500 (EST)

branch: externals/ebdb
commit f07cadf1c2028b2aab967bdb31a24ad06f1fe3bf
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>

    Exclude full formatter from `ebdb-available-ebdb-formatters'
    * ebdb-com.el (ebdb-available-ebdb-formatters): The full formatter is
      selected with its own function, the toggle/loop shouldn't use it by
 ebdb-com.el | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/ebdb-com.el b/ebdb-com.el
index 4468564..bf98178 100644
--- a/ebdb-com.el
+++ b/ebdb-com.el
@@ -503,11 +503,15 @@ and 'role, and the special shortcuts 'mail-primary,
   "Formatter used for displaying all values of a record.
 This formatter should not be changed.")
-(defun ebdb-available-ebdb-formatters ()
+(defun ebdb-available-ebdb-formatters (&optional full-okay)
   "A list of formatters available in the *EBDB* buffer.
-This list is also used for toggling layouts."
+This list is also used for toggling layouts.  Unless FULL-OKAY is
+non-nil, do not offer the value of `ebdb-full-formatter' as a
+choice: that formatter should be selected explicitly."
-   (lambda (f) (object-of-class-p f 'ebdb-formatter-ebdb))
+   (lambda (f) (and (object-of-class-p f 'ebdb-formatter-ebdb)
+                   (or full-okay
+                       (null (equal f ebdb-full-formatter)))))
 (defsubst ebdb-formatter-prefix ()

reply via email to

[Prev in Thread] Current Thread [Next in Thread]