diff options
| author | Masatake YAMATO | 2004-03-15 08:39:06 +0000 |
|---|---|---|
| committer | Masatake YAMATO | 2004-03-15 08:39:06 +0000 |
| commit | 0eeebaf5d779e417c9582ccb1e7a1d20708f779d (patch) | |
| tree | a20adceae4476caf8873fad538ce84f401ed7072 | |
| parent | 9b05111d02c55dc07ec645d58489484ca6f2fa7c (diff) | |
| download | emacs-0eeebaf5d779e417c9582ccb1e7a1d20708f779d.tar.gz emacs-0eeebaf5d779e417c9582ccb1e7a1d20708f779d.zip | |
2004-03-15 David Ponce <david@dponce.com>
* ruler-mode.el: (ruler-mode-left-fringe-cols)
(ruler-mode-right-fringe-cols, ruler-mode-left-scroll-bar-cols)
(ruler-mode-right-scroll-bar-cols): Remove.
(ruler-mode-window-col, ruler-mode-mouse-set-left-margin)
(ruler-mode-mouse-set-right-margin, ruler-mode-ruler): Use
fringe-columns and scroll-bar-columns.
| -rw-r--r-- | lisp/ChangeLog | 9 | ||||
| -rw-r--r-- | lisp/ruler-mode.el | 43 |
2 files changed, 21 insertions, 31 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d7c955c8471..5a4799a913f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2004-03-15 David Ponce <david@dponce.com> | ||
| 2 | |||
| 3 | * ruler-mode.el: (ruler-mode-left-fringe-cols) | ||
| 4 | (ruler-mode-right-fringe-cols, ruler-mode-left-scroll-bar-cols) | ||
| 5 | (ruler-mode-right-scroll-bar-cols): Remove. | ||
| 6 | (ruler-mode-window-col, ruler-mode-mouse-set-left-margin) | ||
| 7 | (ruler-mode-mouse-set-right-margin, ruler-mode-ruler): Use | ||
| 8 | fringe-columns and scroll-bar-columns. | ||
| 9 | |||
| 1 | 2004-03-15 Masatake YAMATO <jet@gyve.org> | 10 | 2004-03-15 Masatake YAMATO <jet@gyve.org> |
| 2 | 11 | ||
| 3 | * hl-line.el (hl-line-range-function): New variable. | 12 | * hl-line.el (hl-line-range-function): New variable. |
diff --git a/lisp/ruler-mode.el b/lisp/ruler-mode.el index d6c205a23b4..7cadcc7368b 100644 --- a/lisp/ruler-mode.el +++ b/lisp/ruler-mode.el | |||
| @@ -299,25 +299,6 @@ or remove a tab stop. \\[ruler-mode-toggle-show-tab-stops] or | |||
| 299 | "Face used to highlight the `current-column' character." | 299 | "Face used to highlight the `current-column' character." |
| 300 | :group 'ruler-mode) | 300 | :group 'ruler-mode) |
| 301 | 301 | ||
| 302 | (defsubst ruler-mode-left-fringe-cols (&optional real) | ||
| 303 | "Return the width, measured in columns, of the left fringe area. | ||
| 304 | If optional argument REAL is non-nil, return a real floating point | ||
| 305 | number instead of a rounded integer value." | ||
| 306 | (fringe-columns 'left real)) | ||
| 307 | |||
| 308 | (defsubst ruler-mode-right-fringe-cols (&optional real) | ||
| 309 | "Return the width, measured in columns, of the right fringe area. | ||
| 310 | If optional argument REAL is non-nil, return a real floating point | ||
| 311 | number instead of a rounded integer value." | ||
| 312 | (fringe-columns 'right real)) | ||
| 313 | |||
| 314 | (defmacro ruler-mode-right-scroll-bar-cols () | ||
| 315 | "Return the width, measured in columns, of the right vertical scrollbar." | ||
| 316 | '(scroll-bar-columns 'right)) | ||
| 317 | |||
| 318 | (defmacro ruler-mode-left-scroll-bar-cols () | ||
| 319 | "Return the width, measured in columns, of the left vertical scrollbar." | ||
| 320 | '(scroll-bar-columns 'left)) | ||
| 321 | 302 | ||
| 322 | (defsubst ruler-mode-full-window-width () | 303 | (defsubst ruler-mode-full-window-width () |
| 323 | "Return the full width of the selected window." | 304 | "Return the full width of the selected window." |
| @@ -330,8 +311,8 @@ N is a column number relative to selected frame." | |||
| 330 | (- n | 311 | (- n |
| 331 | (car (window-edges)) | 312 | (car (window-edges)) |
| 332 | (or (car (window-margins)) 0) | 313 | (or (car (window-margins)) 0) |
| 333 | (ruler-mode-left-fringe-cols) | 314 | (fringe-columns 'left) |
| 334 | (ruler-mode-left-scroll-bar-cols))) | 315 | (scroll-bar-columns 'left))) |
| 335 | 316 | ||
| 336 | (defun ruler-mode-mouse-set-left-margin (start-event) | 317 | (defun ruler-mode-mouse-set-left-margin (start-event) |
| 337 | "Set left margin end to the graduation where the mouse pointer is on. | 318 | "Set left margin end to the graduation where the mouse pointer is on. |
| @@ -344,10 +325,10 @@ START-EVENT is the mouse click event." | |||
| 344 | (save-selected-window | 325 | (save-selected-window |
| 345 | (select-window (posn-window start)) | 326 | (select-window (posn-window start)) |
| 346 | (setq col (- (car (posn-col-row start)) (car (window-edges)) | 327 | (setq col (- (car (posn-col-row start)) (car (window-edges)) |
| 347 | (ruler-mode-left-scroll-bar-cols)) | 328 | (scroll-bar-columns 'left)) |
| 348 | w (- (ruler-mode-full-window-width) | 329 | w (- (ruler-mode-full-window-width) |
| 349 | (ruler-mode-left-scroll-bar-cols) | 330 | (scroll-bar-columns 'left) |
| 350 | (ruler-mode-right-scroll-bar-cols))) | 331 | (scroll-bar-columns 'right))) |
| 351 | (when (and (>= col 0) (< col w)) | 332 | (when (and (>= col 0) (< col w)) |
| 352 | (setq lm (window-margins) | 333 | (setq lm (window-margins) |
| 353 | rm (or (cdr lm) 0) | 334 | rm (or (cdr lm) 0) |
| @@ -366,10 +347,10 @@ START-EVENT is the mouse click event." | |||
| 366 | (save-selected-window | 347 | (save-selected-window |
| 367 | (select-window (posn-window start)) | 348 | (select-window (posn-window start)) |
| 368 | (setq col (- (car (posn-col-row start)) (car (window-edges)) | 349 | (setq col (- (car (posn-col-row start)) (car (window-edges)) |
| 369 | (ruler-mode-left-scroll-bar-cols)) | 350 | (scroll-bar-columns 'left)) |
| 370 | w (- (ruler-mode-full-window-width) | 351 | w (- (ruler-mode-full-window-width) |
| 371 | (ruler-mode-left-scroll-bar-cols) | 352 | (scroll-bar-columns 'left) |
| 372 | (ruler-mode-right-scroll-bar-cols))) | 353 | (scroll-bar-columns 'right))) |
| 373 | (when (and (>= col 0) (< col w)) | 354 | (when (and (>= col 0) (< col w)) |
| 374 | (setq lm (window-margins) | 355 | (setq lm (window-margins) |
| 375 | rm (or (cdr lm) 0) | 356 | rm (or (cdr lm) 0) |
| @@ -649,11 +630,11 @@ Optional argument PROPS specifies other text properties to apply." | |||
| 649 | (when ruler-mode | 630 | (when ruler-mode |
| 650 | (let* ((w (window-width)) | 631 | (let* ((w (window-width)) |
| 651 | (m (window-margins)) | 632 | (m (window-margins)) |
| 652 | (lsb (ruler-mode-left-scroll-bar-cols)) | 633 | (lsb (scroll-bar-columns 'left)) |
| 653 | (lf (ruler-mode-left-fringe-cols t)) | 634 | (lf (fringe-columns 'left t)) |
| 654 | (lm (or (car m) 0)) | 635 | (lm (or (car m) 0)) |
| 655 | (rsb (ruler-mode-right-scroll-bar-cols)) | 636 | (rsb (scroll-bar-columns 'right)) |
| 656 | (rf (ruler-mode-right-fringe-cols t)) | 637 | (rf (fringe-columns 'right t)) |
| 657 | (rm (or (cdr m) 0)) | 638 | (rm (or (cdr m) 0)) |
| 658 | (ruler (make-string w ruler-mode-basic-graduation-char)) | 639 | (ruler (make-string w ruler-mode-basic-graduation-char)) |
| 659 | (i 0) | 640 | (i 0) |