help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Free cursor positioning.


From: Kevin Rodgers
Subject: Re: Free cursor positioning.
Date: Mon, 08 Aug 2011 22:53:47 -0600
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2.18) Gecko/20110616 Thunderbird/3.1.11

On 8/5/11 5:03 PM, PJ Weisberg wrote:
On Fri, Aug 5, 2011 at 1:25 PM, Drew Adams<drew.adams@oracle.com>  wrote:
In other words, ignore the position of<eoln>  when moving the
point around, and add spaces where ever necessary to allow for
completely free cursor motion in the buffer region. Then, when
saving the file, automatically trim trailing spaces of each line.

Again, `M-x picture-mode'.

The thing is, when you're in picture mode, you're *not* in C mode,
perl mode, or whatever mode you really want to be in.  He just wants a
few features of picture mode to be on all the time.  Something like:

(require 'picture)
(global-set-key (kbd "<right>") 'picture-forward-column)
(global-set-key (kbd "<up>") 'picture-move-up)
(global-set-key (kbd "<down>") 'picture-move-down)
(add-hook 'before-save-hook 'delete-trailing-whitespace)

Wrap it in define-global-minor-mode, and/or change the global bindings and hook
to locals and wrap that in define-minor-mode.

--
Kevin Rodgers
Denver, Colorado, USA




reply via email to

[Prev in Thread] Current Thread [Next in Thread]