changeset 41461:5507024cc13c

Add pagination. (ruler-mode-toggle-show-tab-stops): No need to test `ruler-mode' variable.
author Richard M. Stallman <rms@gnu.org>
date Sun, 25 Nov 2001 00:10:03 +0000
parents cdee72f7332b
children e251356bc766
files lisp/ruler-mode.el
diffstat 1 files changed, 9 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ruler-mode.el	Sun Nov 25 00:04:41 2001 +0000
+++ b/lisp/ruler-mode.el	Sun Nov 25 00:10:03 2001 +0000
@@ -98,7 +98,7 @@
 
 ;;; History:
 ;;
-
+
 ;;; Code:
 (eval-when-compile
   (require 'wid-edit))
@@ -180,7 +180,7 @@
           (character :tag "Character")
           (integer :tag "Integer char value"
                    :validate ruler-mode-character-validate)))
-
+
 (defface ruler-mode-default-face
   '((((type tty))
      (:inherit default
@@ -242,7 +242,7 @@
                )))
   "Face used to highlight the `current-column' character."
   :group 'ruler-mode)
-
+
 (defun ruler-mode-mouse-set-left-margin (start-event)
   "Set left margin to the graduation where the mouse pointer is on.
 START-EVENT is the mouse click event."
@@ -302,7 +302,7 @@
                (progn
                  (message "Fill column set to %d (was %d)" fc fill-column)
                  (setq fill-column fc)))))))
-
+
 (defun ruler-mode-mouse-add-tab-stop (start-event)
   "Add a tab stop to the graduation where the mouse pointer is on.
 START-EVENT is the mouse click event."
@@ -357,10 +357,9 @@
 (defun ruler-mode-toggle-show-tab-stops ()
   "Toggle showing of tab stops on the ruler."
   (interactive)
-  (when ruler-mode
-    (setq ruler-mode-show-tab-stops (not ruler-mode-show-tab-stops))
-    (force-mode-line-update)))
-
+  (setq ruler-mode-show-tab-stops (not ruler-mode-show-tab-stops))
+  (force-mode-line-update))
+
 (defvar ruler-mode-map
   (let ((km (make-sparse-keymap)))
     (define-key km [header-line down-mouse-1]
@@ -410,7 +409,7 @@
         (setq header-line-format ruler-mode-header-line-format-old))
     (remove-hook 'post-command-hook     ; remove local hook
                  #'force-mode-line-update t)))
-
+
 ;; Add ruler-mode to the the minor mode menu in the mode line
 (define-key mode-line-mode-menu [ruler-mode]
   `(menu-item "Ruler" ruler-mode
@@ -490,7 +489,7 @@
            f (list (cons 'vertical-scroll-bars vsb)
                    (cons 'ruler-mode-left-fringe-cols lfc)))))
     (car lfc)))
-
+
 (defun ruler-mode-ruler ()
   "Return a string ruler."
   (if ruler-mode