aboutsummaryrefslogtreecommitdiff
path: root/sx-switchto.el
diff options
context:
space:
mode:
authorSean Allred <code@seanallred.com>2015-01-07 09:14:12 -0500
committerSean Allred <code@seanallred.com>2015-01-07 09:14:12 -0500
commitf4ef2df13f998b9e30e93ebe7bc9706c562a3d9a (patch)
treeaa5fc38a73cce99a8cbe0b019d44fe3591aa78c3 /sx-switchto.el
parentca97cd41cf3ecfb08c8e63f5fb45616803fb8ed2 (diff)
parent5b66d7865fb9f160586c7d579f8df7195804e927 (diff)
Merge pull request #204 from vermiculus/issue-137-tag-completion
Issue 137 tag completion
Diffstat (limited to 'sx-switchto.el')
-rw-r--r--sx-switchto.el12
1 files changed, 0 insertions, 12 deletions
diff --git a/sx-switchto.el b/sx-switchto.el
index 458586a..ed83360 100644
--- a/sx-switchto.el
+++ b/sx-switchto.el
@@ -54,18 +54,6 @@
;;; These are keys which depend on context.
;;;; For instance, it makes no sense to have `switch-site' bound to a
;;;; key on a buffer with no `sx-question-list--site' variable.
-(defmacro sx--define-conditional-key (keymap key def &rest body)
- "In KEYMAP, define key sequence KEY as DEF conditionally.
-This is like `define-key', except the definition \"disapears\"
-whenever BODY evaluates to nil."
- (declare (indent 3)
- (debug (form form form &rest sexp)))
- `(define-key ,keymap ,key
- '(menu-item
- ,(format "maybe-%s" (or (car (cdr-safe def)) def)) ignore
- :filter (lambda (&optional _)
- (when (progn ,@body) ,def)))))
-
(sx--define-conditional-key sx-switchto-map "s" #'sx-question-list-switch-site
(and (boundp 'sx-question-list--site) sx-question-list--site))