(ruler-mode-header-line-format-old): Don't `make-variable-buffer-local'.
(ruler-mode-ruler-function): Default to `ruler-mode-ruler'.
(ruler-mode-header-line-format): Simply funcall the above.
(ruler-mode): Use `make-local-variable' and `kill-local-variable'
to save/restore a previous header line format.
(ruler-mode-space): Don't depend on a numeric WIDTH value.
(ruler-mode-ruler): Use symbolic display elements for scrollbar,
fringes and margins width.
(ruler-mode-ruler-function): Default to ruler-mode-ruler
* hl-line.el (hl-line-range-function): New variable.
(hl-line-move): New function.
(global-hl-line-highlight): Use `hl-line-move'.
(hl-line-highlight): Ditto.
* scroll-bar.el (scroll-bar-columns): New function derived from
ruler-mode.el.
* fringe.el (fringe-columns): New function derived from
ruler-mode.el.
* ruler-mode.el (top-level): Require scroll-bar and fringe.
(ruler-mode-left-fringe-cols)
(ruler-mode-right-fringe-cols): Use `fringe-columns'.
(ruler-mode-right-scroll-bar-cols)
(ruler-mode-left-scroll-bar-cols): Use `scroll-bar-columns'.
(ruler-mode-ruler-function): New variable.
(ruler-mode-header-line-format): Call `ruler-mode-ruler-function'
if the value for `ruler-mode-ruler-function'is given.
* hexl.el (hexl-mode-hook): Make the hook customizable.
(hexl-address-area, hexl-ascii-area, hexl-ascii-cursor): New
customize variables.
(hexlify-buffer): Put font-lock-faces on the address area and
the ascii area.
(hexl-activate-ruler): New function.
(hexl-follow-line): New function.
(hexl-highlight-line-range): New function.
(hexl-mode-ruler): New function.
argument REAL, to return a real number instead of a rounded
integer value. Define as inline function.
(ruler-mode-right-fringe-cols): Likewise.
(ruler-mode-scroll-bar-cols): New function.
(ruler-mode-left-scroll-bar-cols): Use it. Define as macro.
(ruler-mode-right-scroll-bar-cols): Likewise.
(ruler-mode-space): New function.
(ruler-mode-ruler): Use it. Handle variations of fringe style,
scroll bar mode and margins in a more robust way.
Take into account changes made to the display margins, fringes and
scroll-bar handling.
(ruler-mode-margins-char): Removed. Not used anymore.
(ruler-mode-pad-face, ruler-mode-fringes-face): New faces.
(ruler-mode-margins-face): New definition. Moved.
(ruler-mode-left-fringe-cols)
(ruler-mode-right-fringe-cols)
(ruler-mode-left-scroll-bar-cols)
(ruler-mode-right-scroll-bar-cols): Reimplemented. Moved.
(ruler-mode-full-window-width)
(ruler-mode-window-col): New functions.
(ruler-mode-mouse-set-left-margin)
(ruler-mode-mouse-set-right-margin)
(ruler-mode-mouse-add-tab-stop)
(ruler-mode-mouse-del-tab-stop): Reimplemented.
(ruler-mode-mouse-current-grab-object): Renamed to...
(ruler-mode-dragged-symbol): New.
(ruler-mode-mouse-grab-any-column): Use it. Cleaned up.
(ruler-mode-mouse-drag-any-column): Likewise.
(ruler-mode-mouse-drag-any-column-iteration): Simplified.
(ruler-mode): Restore previous `header-line-format' if
`ruler-mode-header-line-format-old' has a local binding in current
buffer.
(ruler-mode-left-margin-help-echo)
(ruler-mode-right-margin-help-echo): Removed.
(ruler-mode-margin-help-echo)
(ruler-mode-fringe-help-echo): New constants.
(ruler-mode-ruler): Use them. Reimplemented.
(ruler-mode-set-goal-column-ding-flag, ruler-mode-mouse-current-grab-object):
New variables.
(ruler-mode-comment-column-face, ruler-mode-goal-column-face): New faces.
(ruler-mode-mouse-set-fill-column): Removed.
(ruler-mode-mouse-grab-any-column, ruler-mode-mouse-drag-any-column-iteration)
(ruler-mode-mouse-drag-any-column): New functions.
(ruler-mode-map): [header-line down-mouse-2] Bound to
`ruler-mode-mouse-grab-any-column' instead of
`ruler-mode-mouse-set-fill-column'.
(ruler-mode): Cleanup buffer local variable `header-line-format' if it didn't
exist when `ruler-mode' was enabled.
(ruler-mode-ruler-help-echo): Updated its value.
(ruler-mode-ruler-help-echo-when-goal-column): New help string used when
goal-column is already set.
(ruler-mode-ruler-help-echo-tab): Renamed to...
(ruler-mode-ruler-help-echo-when-tab-stops): New.
(ruler-mode-fill-column-help-echo, ruler-mode-comment-column-help-echo)
(ruler-mode-goal-column-help-echo): New help strings.
(ruler-mode-ruler): Use `ruler-mode-ruler-help-echo-when-goal-column' instead of
`ruler-mode-ruler-help-echo' if `goal-column' is set. Show `comment-column' and
`goal-column'. Echo the different help string for each *-column characters on
the ruler.
(ruler-mode-left-fringe-cols): New macro.
(ruler-mode-right-fringe-cols): New macro.
(ruler-mode-left-scroll-bar-cols): New macro.
(ruler-mode-right-scroll-bar-cols): New macro.
(ruler-mode-ruler): Use above new macros.
(ruler-mode-left-fringe-cols): Function replaced by more efficient
implementation `ruler-mode-extra-left-cols'.
(ruler-mode-ruler): Use above new function. Take into account
that the fringe areas can now be resized.