]> git.eshelyaron.com Git - emacs.git/commitdiff
* woman.el (woman-follow): New function, based on `man-follow'.
authorChong Yidong <cyd@stupidchicken.com>
Mon, 28 Aug 2006 15:40:21 +0000 (15:40 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Mon, 28 Aug 2006 15:40:21 +0000 (15:40 +0000)
(woman-mode-map): Use it.

* ibuffer.el (ibuffer-do-sort-by-recency): Perform full update
since ibuffer-do-sort-by-recency does not define a sorter.

lisp/ChangeLog
lisp/ibuffer.el
lisp/woman.el

index 378eb276091511dcf6fa9432c4ea867b26d689b8..cdb21cb510d77af05b577778260ce056b7d15a25 100644 (file)
@@ -1,3 +1,11 @@
+2006-08-28  Chong Yidong  <cyd@stupidchicken.com>
+
+       * woman.el (woman-follow): New function, based on `man-follow'.
+       (woman-mode-map): Use it.
+
+       * ibuffer.el (ibuffer-do-sort-by-recency): Perform full update
+       since ibuffer-do-sort-by-recency does not define a sorter.
+
 2006-08-28  Kim F. Storm  <storm@cua.dk>
 
        * find-dired.el (find-dired): Use shell-quote-argument to properly
index 29767cee7f6a25d8fd4b1d7470eafe51f86edf06..04672f6e29fcad5d076d340a864b1c0c7e02cf3c 100644 (file)
@@ -1972,12 +1972,12 @@ the value of point at the beginning of the line for that buffer."
                (not (eq ibuffer-buf buf))))))
 
 ;; This function is a special case; it's not defined by
-;; `ibuffer-define-sorter'.
+;; `define-ibuffer-sorter'.
 (defun ibuffer-do-sort-by-recency ()
   "Sort the buffers by last view time."
   (interactive)
   (setq ibuffer-sorting-mode 'recency)
-  (ibuffer-redisplay t))
+  (ibuffer-update nil t))
 
 (defun ibuffer-update-format ()
   (when (null ibuffer-current-format)
index 2392d0bfa4cacffba3073c27b78a2a615f390df4..f4e01bcdd4e114c2fd7e7aef3e8f35bd89ad4452 100644 (file)
@@ -1750,7 +1750,18 @@ Leave point at end of new text.  Return length of inserted text."
   (define-key woman-mode-map [M-mouse-2] 'woman-follow-word)
 
   ;; We don't need to call `man' when we are in `woman-mode'.
-  (define-key woman-mode-map [remap man] 'woman))
+  (define-key woman-mode-map [remap man] 'woman)
+  (define-key woman-mode-map [remap man-follow] 'woman-follow))
+
+(defun woman-follow (topic)
+  "Get a Un*x manual page of the item under point and put it in a buffer."
+  (interactive (list (Man-default-man-entry)))
+  (if (or (not topic)
+         (string= topic ""))
+      (error "No item under point")
+    (woman (if (string-match Man-reference-regexp topic)
+              (substring topic 0 (match-end 1))
+            topic))))
 
 (defun woman-follow-word (event)
   "Run WoMan with word under mouse as topic.