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

Re: wl-draft-send-confirm-type default



At Mon, 18 Apr 2011 20:53:15 +0900,
Kazuhiro Ito wrote:
>
> […]
> 
> This issue was discussed in Japanese.  The reason of above change is
> that early wl-y-or-n-p-with-scroll function (corresponding function to
> scroll-by-j/k or scroll-by-SPC/BS) can't run on XEmacs.  But the
> problem has been fixed (on the next day of that change).  I also think
> there is no reason to keep that change.

Hi,

Thank you for the information!

Unfortunately the fix for Xemacs seems to break scrolling by space in
GNU Emacs (at least my version). I have committed a fix for the
problem with scroll-by-SPC/BS, but I do not know if this will work on
Xemacs.

  https://github.com/egh/wanderlust/commit/c1dcc17f05afd54d869e596f31c5c9bb28325dbf

Apparently the only different between setting
wl-draft-send-confirm-type to 'scroll-by-j/k or 'scroll-by-SPC/BS is
that space is interpreted as “do not send message” in scroll-by-j/k
mode and “scroll down” in scroll-by-SPC/BS mode.  Otherwise they
behave the same (j and k work in both, for instance).

I wonder: is this a useful distinction? Could we merge these modes?
That is, redefine wl-y-or-n-p-with-scroll as:

  (defun wl-y-or-n-p-with-scroll (prompt)
    (let ((prompt (concat prompt "<y/n/j,SPC(down)/k,BS(up)> ")))
      (catch 'done
        (while t
          (discard-input)
          (case (let ((cursor-in-echo-area t))
                      (cdr (wl-read-event-char prompt)))
            ((?y ?Y)
             (throw 'done t))
            ((? ) ;; space
             (ignore-errors (scroll-up)))
            ((?v ?j ?J next)
             (ignore-errors (scroll-up)))
            ((?^ ?k ?K prior backspace)
             (ignore-errors (scroll-down)))
            (t
             (throw 'done nil)))))))

best, Erik
Sent from my free software system <http://fsf.org/>.