<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -122,6 +122,9 @@
 ;;     `anything-c-source-icicle-region' (Icicle Regions)
 ;;  Kill ring:
 ;;     `anything-c-source-kill-ring' (Kill Ring)
+;;  Mark ring:
+;;     `anything-c-source-mark-ring'        (mark-ring)
+;;     `anything-c-source-global-mark-ring' (global-mark-ring)
 ;;  Register:
 ;;     `anything-c-source-register' (Registers)
 ;;  Headline Extraction:
@@ -210,6 +213,10 @@
 ;;    List all anything sources for test.
 ;;  `anything-select-source'
 ;;    Select source.
+;;  `anything-mark-ring'
+;;    Preconfigured `anything' for `anything-c-source-mark-ring'.
+;;  `anything-global-mark-ring'
+;;    Preconfigured `anything' for `anything-c-source-global-mark-ring'.
 ;;  `anything-yaoddmuse-cache-pages'
 ;;    Fetch the list of files on emacswiki and create cache file.
 ;;  `anything-yaoddmuse-emacswiki-edit-or-view'
@@ -1447,40 +1454,50 @@ Blue ==&gt; regular file with maybe a region saved.
 RedOnWhite ==&gt; Directory.&quot;
   (loop for i in files
      for pred = (bookmark-get-filename i)
-     for bufp = (and (fboundp 'bookmark-get-buffername)
-                     (bookmark-get-buffername i))
-     for regp = (and (fboundp 'bookmark-get-endposition)
-                     (bookmark-get-endposition i)
+     for bufp = (and (fboundp 'bookmark-get-buffer-name)
+                     (bookmark-get-buffer-name i))
+     for regp = (and (fboundp 'bookmark-get-end-position)
+                     (bookmark-get-end-position i)
                      (/= (bookmark-get-position i)
-                         (bookmark-get-endposition i)))
+                         (bookmark-get-end-position i)))
      for handlerp = (and (fboundp 'bookmark-get-handler)
                          (bookmark-get-handler i))
-     if (and pred ;; directories
+     ;; directories
+     if (and pred 
              (file-directory-p pred))
-     collect (propertize i 'face anything-c-bookmarks-face1)
-     if (and pred ;; regular files
+     collect (propertize i 'face anything-c-bookmarks-face1 'help-echo pred)
+     ;; regular files
+     if (and pred 
              (not (file-directory-p pred))
              (file-exists-p pred)
              (not regp))
-     collect (propertize i 'face anything-c-bookmarks-face2)
-     if (and pred ;; regular files with regions saved
+     collect (propertize i 'face anything-c-bookmarks-face2 'help-echo pred)
+     ;; regular files with regions saved
+     if (and pred 
              (not (file-directory-p pred))
              (file-exists-p pred)
              regp)
-     collect (propertize i 'face '((:foreground &quot;Indianred2&quot;)))
-     if (and (fboundp 'bookmark-get-buffername) ;; buffer non--filename
+     collect (propertize i 'face '((:foreground &quot;Indianred2&quot;)) 'help-echo pred)
+     ;; gnus
+     if (eq handlerp 'bookmark-jump-gnus)
+     collect (propertize i 'face '((:foreground &quot;magenta&quot;)) 'help-echo pred)
+     ;; buffer non--filename
+     if (and (fboundp 'bookmark-get-buffer-name)
              bufp
+             (not (eq handlerp 'bookmark-jump-gnus))
              (not pred))
      collect (propertize i 'face '((:foreground &quot;grey&quot;)))
-     if (and (fboundp 'bookmark-get-buffername) ;; w3m buffers
+     ;; w3m buffers
+     if (and (fboundp 'bookmark-get-buffer-name)
              (string= bufp &quot;*w3m*&quot;)
              (when pred
                (not (file-exists-p pred))))
-     collect (propertize i 'face '((:foreground &quot;yellow&quot;)))
-     if (and (fboundp 'bookmark-get-buffername) ;; info buffers
+     collect (propertize i 'face '((:foreground &quot;yellow&quot;)) 'help-echo pred)
+     ;; info buffers
+     if (and (fboundp 'bookmark-get-buffer-name)
              (eq handlerp 'Info-bookmark-jump)
              (string= bufp &quot;*info*&quot;))
-     collect (propertize i 'face '((:foreground &quot;green&quot;)))))
+     collect (propertize i 'face '((:foreground &quot;green&quot;)) 'help-echo pred)))
        
 
 (defvar anything-c-source-bookmarks-local
@@ -1812,13 +1829,11 @@ http://ctags.sourceforge.net/&quot;)
     (persistent-action . (lambda (elm)
                            (anything-semantic-default-action elm)
                            (anything-match-line-color-current-line)))
-    (action (&quot;Goto tag&quot; . (lambda (candidate)
-                            (let ((tag (cdr (assoc candidate anything-semantic-candidates))))
-                              (semantic-go-to-tag tag))))))
+    (action . anything-semantic-default-action)
   &quot;Needs semantic in CEDET.
 
 http://cedet.sourceforge.net/semantic.shtml
-http://cedet.sourceforge.net/&quot;)
+http://cedet.sourceforge.net/&quot;))
 
 ;; (anything 'anything-c-source-semantic)
 
@@ -2107,6 +2122,95 @@ If this action is executed just after `yank', replace with STR as yanked string.
 
 ;; (anything 'anything-c-source-kill-ring)
 
+;;;; &lt;Mark ring&gt;
+;; DO NOT include these sources in `anything-sources' use
+;; the commands `anything-mark-ring' and `anything-global-mark-ring' instead.
+
+(defun anything-c-source-mark-ring-candidates ()
+  (flet ((get-marks (pos)
+           (save-excursion
+             (goto-char pos)
+             (beginning-of-line)
+             (let ((line  (car (split-string (thing-at-point 'line) &quot;[\n\r]&quot;))))
+               (when (string= &quot;&quot; line)
+                 (setq line  &quot;&lt;EMPTY LINE&gt;&quot;))
+               (format &quot;%7d: %s&quot; (line-number-at-pos) line)))))
+    (with-current-buffer anything-current-buffer
+      (loop
+         with marks = (cons (mark-marker) mark-ring)
+         with recip = nil
+         for i in marks
+         for f = (get-marks i) 
+         if (not (member f recip))
+         do
+           (push f recip)
+         finally (return (reverse recip))))))
+           
+(defvar anything-mark-ring-cache nil)
+(defvar anything-c-source-mark-ring
+  '((name . &quot;mark-ring&quot;)
+    (init . (lambda ()
+              (setq anything-mark-ring-cache
+                    (anything-c-source-mark-ring-candidates))))
+    (candidates . (lambda ()
+                    (anything-aif anything-mark-ring-cache
+                        it)))
+    (action . ((&quot;Goto line&quot; . (lambda (candidate)
+                                (goto-line (string-to-number candidate))))))
+    (persistent-action . (lambda (candidate)
+                           (goto-line (string-to-number candidate))
+                           (anything-match-line-color-current-line)))))
+
+;; (anything 'anything-c-source-mark-ring)
+
+(defun anything-mark-ring ()
+  &quot;Preconfigured `anything' for `anything-c-source-mark-ring'.&quot;
+  (interactive)
+  (anything 'anything-c-source-mark-ring))
+
+;;; Global-mark-ring
+(defvar anything-c-source-global-mark-ring
+  '((name . &quot;global-mark-ring&quot;)
+    (candidates . anything-c-source-global-mark-ring-candidates)
+    (action . ((&quot;Goto line&quot; . (lambda (candidate)
+                                (let ((items (split-string candidate &quot;:&quot;)))
+                                  (switch-to-buffer (second items))
+                                  (goto-line (string-to-number (car items))))))))
+    (persistent-action . (lambda (candidate)
+                           (let ((items (split-string candidate &quot;:&quot;)))
+                             (switch-to-buffer (second items))
+                             (goto-line (string-to-number (car items)))
+                             (anything-match-line-color-current-line))))))
+                             
+(defun anything-c-source-global-mark-ring-candidates ()
+  (flet ((buf-fn (m)
+           (with-current-buffer (marker-buffer m)
+             (goto-char m)
+             (beginning-of-line)
+             (let (line)
+               (if (string= &quot;&quot; line)
+                   (setq line  &quot;&lt;EMPTY LINE&gt;&quot;)
+                   (setq line (car (split-string (thing-at-point 'line) &quot;[\n\r]&quot;))))
+               (format &quot;%7d:%s:    %s&quot; (line-number-at-pos) (marker-buffer m) line)))))
+    (loop
+       with marks = global-mark-ring
+       with recip = nil  
+       for i in marks
+       if (not (or (string-match &quot;^ &quot; (format &quot;%s&quot; (marker-buffer i)))
+                   (null (marker-buffer i))))
+       for a = (buf-fn i)
+       if (and a (not (member a recip)))
+       do
+         (push a recip)
+       finally (return (reverse recip)))))
+
+;; (anything 'anything-c-source-global-mark-ring)
+
+(defun anything-global-mark-ring ()
+  &quot;Preconfigured `anything' for `anything-c-source-global-mark-ring'.&quot;
+  (interactive)
+  (anything 'anything-c-source-global-mark-ring))
+
 ;;;; &lt;Register&gt;
 ;;; Insert from register
 (defvar anything-c-source-register
@@ -2912,10 +3016,14 @@ See also `anything-create--actions'.&quot;
   (let ((default-font elm))
     (set-default-font default-font)))
 
+(defvar anything-c-xfonts-cache nil)
 (defvar anything-c-source-xfonts
   '((name . &quot;X Fonts&quot;)
-    (candidates . (lambda ()
-                    (x-list-fonts &quot;*&quot;)))
+    (init . (lambda ()
+              (unless anything-c-xfonts-cache
+                (setq anything-c-xfonts-cache
+                      (x-list-fonts &quot;*&quot;)))))  
+    (candidates . anything-c-xfonts-cache)
     (multiline)
     (action . ((&quot;Copy to kill ring&quot; . (lambda (elm)
                                         (kill-new elm)))
@@ -3792,6 +3900,8 @@ If optional 2nd argument is non-nil, the file opened with `auto-revert-mode'.&quot;)
     (anything-c-delete-file i)))
 
 (defun anything-ediff-marked-buffers (candidate &amp;optional merge)
+  &quot;Ediff 2 marked buffers or 1 marked buffer and current-buffer.
+With optional arg `merge' call `ediff-merge-buffers'.&quot;
   (let ((lg-lst (length anything-c-marked-candidate-list))
         buf1 buf2)
     (case lg-lst
@@ -3810,6 +3920,7 @@ If optional 2nd argument is non-nil, the file opened with `auto-revert-mode'.&quot;)
         (ediff-buffers buf1 buf2))))
 
 (defun anything-delete-marked-bookmarks (elm)
+  &quot;Delete this bookmark or all marked bookmarks.&quot;
   (anything-aif anything-c-marked-candidate-list
       (progn
         (dolist (i it)
@@ -3817,6 +3928,20 @@ If optional 2nd argument is non-nil, the file opened with `auto-revert-mode'.&quot;)
         (bookmark-save))
     (bookmark-delete elm)))
 
+(defun anything-bookmark-active-region-maybe (candidate)
+  &quot;Active saved region if this bookmark have one.&quot;
+  (condition-case nil
+      (when (and (boundp bookmark-use-region-flag)
+                 bookmark-use-region-flag)
+        (let ((bmk-name (or (bookmark-get-buffer-name candidate)
+                            (file-name-nondirectory
+                             (bookmark-get-filename candidate)))))
+          (when bmk-name
+            (with-current-buffer bmk-name
+              (setq deactivate-mark nil)))))
+    (error nil)))
+
+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Setup ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 ;;; Type Attributes
@@ -3897,23 +4022,16 @@ If optional 2nd argument is non-nil, the file opened with `auto-revert-mode'.&quot;)
      (&quot;Jump to bookmark&quot; . (lambda (candidate)
                              (bookmark-jump candidate)
                              (anything-update)
-                             (condition-case nil
-                                 (when bookmark-use-region
-                                   (let ((bmk-name (or (bookmark-get-buffername candidate)
-                                                       (file-name-nondirectory
-                                                        (bookmark-get-filename candidate)))))
-                                     (when bmk-name
-                                       (with-current-buffer bmk-name
-                                         (setq deactivate-mark nil)))))
-                               (error nil))))
+                             (anything-bookmark-active-region-maybe candidate)))
      (&quot;Jump to BM other window&quot; . (lambda (candidate)
                                     (bookmark-jump-other-window candidate)
-                                    (anything-update)))
+                                    (anything-update)
+                                    (anything-bookmark-active-region-maybe candidate)))
      (&quot;Bookmark edit annotation&quot; . (lambda (candidate)
                                      (bookmark-edit-annotation candidate)))
      (&quot;Bookmark show annotation&quot; . (lambda (candidate)
                                      (bookmark-show-annotation candidate)))
-     (&quot;Delete bookmark&quot; . anything-delete-marked-bookmarks)
+     (&quot;Delete bookmark(s)&quot; . anything-delete-marked-bookmarks)
      (&quot;Rename bookmark&quot; . bookmark-rename)
      (&quot;Relocate bookmark&quot; . bookmark-relocate)))
   &quot;Bookmark name.&quot;)</diff>
      <filename>site-lisp/anything/anything-config.el</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>5d47cd0170640e05c501ff53148b3c14d2e2497b</id>
    </parent>
  </parents>
  <author>
    <name>Steve Purcell</name>
    <email>steve@sanityinc.com</email>
  </author>
  <url>http://github.com/purcell/emacs.d/commit/32057f8753608cf7b2bb089d1330a81ba4c44162</url>
  <id>32057f8753608cf7b2bb089d1330a81ba4c44162</id>
  <committed-date>2009-06-25T14:38:43-07:00</committed-date>
  <authored-date>2009-06-25T14:38:43-07:00</authored-date>
  <message>Update anything-config from upstream</message>
  <tree>49a3c942dda4315f5c64ecccf89f3979b228f4b8</tree>
  <committer>
    <name>Steve Purcell</name>
    <email>steve@sanityinc.com</email>
  </committer>
</commit>
