[Date Prev][Date Next][Thread Prev][][Date Index][Thread Index]

w3m-bookmark-dwim



(defun w3m-bookmark-dwim (url &optional title)
  (interactive
   (if (use-region-p)
       (list w3m-current-url (buffer-substring (region-beginning) (region-end)))
     (let ((url-at-point (thing-at-point 'url)))
       (if url-at-point (list url-at-point)
         (let ((link-url (w3m-url-valid (w3m-anchor))))
           (if link-url (list link-url) ; (w3m-anchor-title) here DNC
             (list w3m-current-url w3m-current-title) ))))))
  (w3m-bookmark-add url title) )

-- 
underground experts united
http://user.it.uu.se/~embe8573