Simplify code.
--- a/autobm.el Mon Apr 20 02:41:54 2015 +0300
+++ b/autobm.el Wed Apr 22 00:54:41 2015 +0300
@@ -1,5 +1,7 @@
;;; autobm.el --- suggest bookmark name from local context
+(require 'cl-lib)
+
(defvar autobm-mode-handlers
'((emacs-lisp-mode . (autobm-try-semantic))
(semantic-decoration-mode . (autobm-try-semantic))
@@ -15,11 +17,7 @@
'(symbol url email))
(defun autobm-try-thingatpt ()
- (let ((things autobm-try-thingatpt-things) name)
- (while (and things (not name))
- (setq name (thing-at-point (car things)))
- (setq things (cdr things)))
- name))
+ (cl-some #'thing-at-point autobm-try-thingatpt-things))
(defun autobm-get-active-handlers ()
(let ( h handlers (modes (list t)) )