stumpwm-devel
[Top][All Lists]
Advanced

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

Re: [STUMP] [PATCH] command-mode-hook


From: Matt Spear
Subject: Re: [STUMP] [PATCH] command-mode-hook
Date: Thu, 10 Mar 2011 20:57:05 -0800

Inline.

Thanks for the help!!!
Matt Spear
address@hidden



On Thu, Mar 10, 2011 at 11:45 AM, Ben Spencer <address@hidden> wrote:
> Hi Matt,
>
> On Wed, Mar 09, 2011 at 10:11:06PM -0800, Matt Spear wrote:
>> Have a *command-mode-start-hook* and a *command-mode-end-hook*.
>
> Cool.  I guess these should be exported.
>
>
>> (move the defvar *root-map* to primitives)
>
> Might fit better in kmap.lisp, where *top-map* is defined.

Makes sense, in a cleanup it would make sense to move *resize-map* there too.

>> Also changed the grab/ungrab pointer to use a counter so that things
>> work right when not making the pointer grabbed during command-mode.
>
> Nice.  You don't need the progns in grab-pointer and ungrab-pointer
> though, function bodies have an implicit progn.

Thanks!

>> I made the (message "Exited") not appear when in command-mode as the
>> command-mode-end-hook may want to do a message (in my case it is
>> distracting as the pointer changes shape).  If desired
>> command-mode-end-hook can do it.
>
> So as it stands there are no enter and exit messages (and thus no
> feedback at all) for command mode by default?
>
> On reflection, maybe we should prepopulate the hooks with message
> functions after all.  If so, they should be named, exported functions,
> eg command-mode-start-message and command-mode-end-message.  This
> would enable the user to selectively remove parts of the default hook.
>
> Anyone else have opinions on this approach?

I took this approach and can change it if something else comes up.

>> +  (let ((in-top-map (eq *top-map* *root-map*)))
>> +    (when (pop-top-map)
>> +      (if in-top-map
>
> Minor: this variable name doesn't really seem to fit.  in-command-mode
> perhaps?  Alternatively maybe pop-top-map could be changed to return
> the map it's just popped, avoiding the need for a variable altogether.

Changed variable name to in-command-mode, not sure how making
pop-top-map to return the map popped is any cleaner.

> Ben
>
> _______________________________________________
> Stumpwm-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/stumpwm-devel
>

Attachment: command-hook.patch
Description: Text Data


reply via email to

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