comparison lisp/info.el @ 373:6240c7796c7a r21-2b2

Import from CVS: tag r21-2b2
author cvs
date Mon, 13 Aug 2007 11:04:06 +0200
parents cc15677e0335
children a300bb07d72d
comparison
equal deleted inserted replaced
372:49e1ed2d7ed8 373:6240c7796c7a
2612 (defun Info-mouse-track-double-click-hook (event click-count) 2612 (defun Info-mouse-track-double-click-hook (event click-count)
2613 "Handle double-clicks by turning pages, like the `gv' ghostscript viewer" 2613 "Handle double-clicks by turning pages, like the `gv' ghostscript viewer"
2614 (if (/= click-count 2) 2614 (if (/= click-count 2)
2615 ;; Return nil so any other hooks are performed. 2615 ;; Return nil so any other hooks are performed.
2616 nil 2616 nil
2617 (let* ((x (event-x-pixel event)) 2617 (let* ((fw (face-width 'default))
2618 (y (event-y-pixel event)) 2618 (fh (face-height 'default))
2619 (w (window-pixel-width (event-window event))) 2619 (x (/ (event-x-pixel event) fw))
2620 (h (window-pixel-height (event-window event))) 2620 (y (/ (event-y-pixel event) fw))
2621 (w/3 (/ w 3)) 2621 (w (/ (window-pixel-width (event-window event)) fw))
2622 (w/2 (/ w 2)) 2622 (h (/ (window-pixel-height (event-window event)) fh))
2623 (h/4 (/ h 4))) 2623 (bx 3)
2624 (by 2))
2624 (cond 2625 (cond
2625 ;; In the top 1/4 and inside the middle 1/3 2626 ((<= y by) (Info-up) t)
2626 ((and (<= y h/4) 2627 ((>= y (- h by)) (Info-nth-menu-item 1) t)
2627 (and (>= x w/3) (<= x (+ w/3 w/3)))) 2628 ((<= x bx) (Info-prev) t)
2628 (Info-up) 2629 ((>= x (- w bx)) (Info-next) t)
2629 t) 2630 (t nil)))))
2630 ;; In the bottom 1/4 and inside the middle 1/3
2631 ((and (>= y (+ h/4 h/4 h/4))
2632 (and (>= x w/3) (<= x (+ w/3 w/3))))
2633 (Info-nth-menu-item 1)
2634 t)
2635 ;; In the lower 3/4 and the right 1/2
2636 ;; OR in the upper 1/4 and the right 1/3
2637 ((or (and (>= y h/4) (>= x w/2))
2638 (and (< y h/4) (>= x (+ w/3 w/3))))
2639 (Info-next)
2640 t)
2641 ;; In the lower 3/4 and the left 1/2
2642 ;; OR in the upper 1/4 and the left 1/3
2643 ((or (and (>= y h/4) (< x w/2))
2644 (and (< y h/4) (<= x w/3)))
2645 (Info-prev)
2646 t)
2647 ;; This shouldn't happen.
2648 (t
2649 (error "event out of bounds: %s %s" x y))))))
2650 2631
2651 (defvar Info-mode-map nil 2632 (defvar Info-mode-map nil
2652 "Keymap containing Info commands.") 2633 "Keymap containing Info commands.")
2653 (if Info-mode-map 2634 (if Info-mode-map
2654 nil 2635 nil
2740 Space Scroll forward a full screen. DEL Scroll backward. 2721 Space Scroll forward a full screen. DEL Scroll backward.
2741 b Go to beginning of node. Meta-> Go to end of node. 2722 b Go to beginning of node. Meta-> Go to end of node.
2742 TAB Go to next cross-reference. Meta-TAB Go to previous ref. 2723 TAB Go to next cross-reference. Meta-TAB Go to previous ref.
2743 2724
2744 Mouse commands: 2725 Mouse commands:
2745 Left Button Set point. 2726 Left Button Set point (usual text-mode functionality)
2746 Middle Button Click on a highlighted node reference to go to it. 2727 Middle Button Click on a highlighted node reference to go to it.
2747 Right Button Pop up a menu of applicable Info commands. 2728 Right Button Pop up a menu of applicable Info commands.
2729
2730 Left Button Double Click in window edges:
2731 Top edge: Go up to the parent node, like `u'.
2732 Left edge: Go to the previous node, like `p'.
2733 Right edge: Go to the next node, like `n'.
2734 Bottom edge: Follow first menu item, like `1'.
2748 2735
2749 Advanced commands: 2736 Advanced commands:
2750 g Move to node, file, or annotation tag specified by name. 2737 g Move to node, file, or annotation tag specified by name.
2751 Examples: `g Rectangles' `g (Emacs)Rectangles' `g Emacs'. 2738 Examples: `g Rectangles' `g (Emacs)Rectangles' `g Emacs'.
2752 v Move to file, with filename completion. 2739 v Move to file, with filename completion.