From 6a817e3f776bb9a6879ee98d399aa55e7ca16bcc Mon Sep 17 00:00:00 2001 From: morioka Date: Sun, 25 Oct 1998 18:54:40 +0000 Subject: [PATCH] (rassoc): New function. --- poe.el | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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 -- 1.7.10.4