aboutsummaryrefslogtreecommitdiff
path: root/sx.el
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2015-04-20 20:53:16 +0100
committerArtur Malabarba <bruce.connor.am@gmail.com>2015-04-20 20:53:16 +0100
commit4e053fceed58d72c5670556ec0537610d52d6fa7 (patch)
tree3386c223e16a4dcda805da21d353b5eb030166f1 /sx.el
parent7ee1f7f1f28777d2d69a7ef589f6c7c6667835c3 (diff)
Move sx-sorted-insert-skip-first
Diffstat (limited to 'sx.el')
-rw-r--r--sx.el13
1 files changed, 0 insertions, 13 deletions
diff --git a/sx.el b/sx.el
index 194e32f..bda8186 100644
--- a/sx.el
+++ b/sx.el
@@ -206,19 +206,6 @@ All ARGS are passed to `completing-read' or `ido-completing-read'."
(apply (if ido-mode #'ido-completing-read #'completing-read)
args))
-(defmacro sx-sorted-insert-skip-first (newelt list &optional predicate)
- "Inserted NEWELT into LIST sorted by PREDICATE.
-This is designed for the (site id id ...) lists. So the first car
-is intentionally skipped."
- `(let ((tail ,list)
- (x ,newelt))
- (while (and ;; We're not at the end.
- (cdr-safe tail)
- ;; We're not at the right place.
- (funcall (or ,predicate #'<) x (cadr tail)))
- (setq tail (cdr tail)))
- (setcdr tail (cons x (cdr tail)))))
-
(defun sx-user-error (format-string &rest args)
"Like `user-error', but prepend FORMAT-STRING with \"[sx]\".
See `format'."