HideIfDef mode bug fixes and enhancements. This is #2 of 3 patches based
[bpt/emacs.git] / lisp / ruler-mode.el
index 9e32a2f..bcd9c54 100644 (file)
@@ -477,8 +477,9 @@ START-EVENT is the mouse click event."
                (not (member ts tab-stop-list))
                (progn
                  (message "Tab stop set to %d" ts)
-                 (setq tab-stop-list (sort (cons ts tab-stop-list)
-                                           #'<)))))))))
+                 (when (null tab-stop-list)
+                   (setq tab-stop-list (indent-accumulate-tab-stops (1- ts))))
+                 (setq tab-stop-list (sort (cons ts tab-stop-list) #'<)))))))))
 
 (defun ruler-mode-mouse-del-tab-stop (start-event)
   "Delete tab stop at the graduation where the mouse pointer is on.
@@ -754,7 +755,7 @@ Optional argument PROPS specifies other text properties to apply."
          i (1+ i) 'help-echo ruler-mode-fill-column-help-echo
          ruler))
        ;; Show the `tab-stop-list' markers.
-       ((and ruler-mode-show-tab-stops (member j tab-stop-list))
+       ((and ruler-mode-show-tab-stops (= j (indent-next-tab-stop (1- j))))
         (aset ruler i ruler-mode-tab-stop-char)
         (put-text-property
          i (1+ i) 'face 'ruler-mode-tab-stop