What's the general census of opinion of this little thing, is it
something that could go into edit-utils? Are there any reasons why it
shouldn't be included?
;; Copyright (C) 1998-2000 Pavel Machek <pavel(a)ucw.cz>
;; Author: Pavel Machek <pavel(a)ucw.cz>
; This minor mode allows you to conviently edit things that are oriented vertically
; (like tables in computer programs): after each action, cursor moves down. Therefore,
; to move block of text to the right, you simply enter vertical mode and then hold
; spacebar, waiting for autorepeat to do the job for you.
;; Put this file into your load-path and the following into your ~/.emacs:
;; (require 'vertical-mode)
(defun vertical-after-change (from to num)
"Function called after each change of text in vertical minor mode"
(defun vertical-before-change (from to)
(setq vertical-goto-point from)
(setq vertical-goto-column (current-column)))
(defvar vertical-mode nil
(defun vertical-mode (&optional arg)
"This function toggles vertical mode on and off."
(if (null arg) (not vertical-mode)
(> (prefix-numeric-value arg) 0)))
(add-hook 'before-change-functions 'vertical-before-change nil t)
(add-hook 'after-change-functions 'vertical-after-change nil t))
(remove-hook 'before-change-functions 'vertical-before-change t)
(remove-hook 'after-change-functions 'vertical-after-change t))))
'(vertical-mode " Vertical") minor-mode-alist))
;;; vertical-mode.el ends here
|---<Regards, Steve Youngs>-----------[GnuPG KeyID: EFD82ED2]---|
| XEmacs - It's not just an editor... |
| It's a way of life. |