From: morioka Date: Sun, 25 Oct 1998 18:54:40 +0000 (+0000) Subject: (rassoc): New function. X-Git-Tag: apel-9_6~3 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=6a817e3f776bb9a6879ee98d399aa55e7ca16bcc;p=elisp%2Fapel.git (rassoc): New function. --- diff --git a/poe.el b/poe.el index 7405c50..ec25124 100644 --- a/poe.el +++ b/poe.el @@ -143,7 +143,7 @@ ;;; @ Emacs 19.29 emulation ;;; -(defvar path-separator ":" +(defvar-maybe path-separator ":" "Character used to separate concatenated paths.") (defun-maybe buffer-substring-no-properties (start end) @@ -182,6 +182,17 @@ See `read-from-minibuffer' for details of HISTORY argument." (si:read-string prompt initial-input)) )) +(defun-maybe rassoc (key list) + "Return non-nil if KEY is `equal' to the cdr of an element of LIST. +The value is actually the element of LIST whose cdr equals KEY." + (catch 'found + (while list + (if (equal (cdr (car list)) key) + (throw 'found (car list)) + ) + (setq list (cdr list))) + )) + (defmacro-maybe make-local-hook (hook)) ;; They are not Emacs features