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

Module code style question.




I can understand that - they can be very hairy. 

To keep things consistent I will do the same with
emacspeak-sql.el. Actually, this has been exactly the area which has
been causing me problems, so its probably better to define the regexps
in the mode itself and keep it simpler to debug.

Tim

Tim
T. V. Raman writes:
 > 
 > The only reason I chose to do what I did is that the regexps are hairy
 > to develop and debug 
 > and I didn't want to take the hit of figuring out why things broke
 > when the regexps changed under emacspeak 
 > >>>>> "Tim" == Tim Cross <tcross@xxxxxxxxxxx> writes:
 > 
 >     Tim> Raman,
 > 
 >     Tim> I have a question about writing emacspeak modules and thought
 >     Tim> I'd send it via the list in case others find the thread
 >     Tim> relevant.
 > 
 >     Tim> I've noticed that in a few emacspeak modules variables are
 >     Tim> defined which contain the regexp of the words to be
 >     Tim> voice-locked. This is very similar (the same) as how many
 >     Tim> emacs modes are written except the regexp represent the words
 >     Tim> to be font-locked in different faces.
 > 
 >     Tim> What I was wondering is if it is better to define our own
 >     Tim> regexp for the voice locking or would we be better off using
 >     Tim> the variables representing the the different font-lock
 >     Tim> catagories in the mode we are associating the module with.
 > 
 >     Tim> For example, in the emacspeak-sql.el module I've been
 >     Tim> updating, there are variables defined which contain regexps
 >     Tim> for things like sql keywords, oracle built-in keywords etc
 >     Tim> which are then associated with different voice personalities
 >     Tim> to provide the voice locking. In the code to sql-mode itself,
 >     Tim> there are variables which contain almost exactly the same
 >     Tim> regexps used for associating keywords with different faces
 >     Tim> for font-locking.
 > 
 >     Tim> I was thinking that using the sql mode regexps to do the
 >     Tim> voice locking might be better than defining our own because
 >     Tim> this would mean that when sql mode is updated with additional
 >     Tim> font-lock keywords, the emacspeak mode would also use them in
 >     Tim> voice locking and this might reduce maintenance in the
 >     Tim> future. However, being still a novice at elisp and not yet
 >     Tim> knowing enough about the internals of emacspeak, I was not
 >     Tim> sure if there are other issues to be considered I'm not aware
 >     Tim> of.
 > 
 >     Tim> Tim -- Tim Cross E-Mail: tcross@xxxxxxxxxxx
 >     Tim> Analyst/Programmer Phone: 6773 3210 Applications Group
 >     Tim> Mobile: 0412 969193 University of New England --- find /
 >     Tim> -iname microsoft -exec rm -rf {} \;
 > 
 >     Tim> -----------------------------------------------------------------------------
 >     Tim> To unsubscribe from the emacspeak list or change your address
 >     Tim> on the emacspeak list send mail to
 >     Tim> "emacspeak-request@xxxxxxxxxxx" with a subject of
 >     Tim> "unsubscribe" or "help"
 > 
 > -- 
 > Best Regards,
 > --raman
 > 
 >       
 > Email:  raman@xxxxxxxxxxx
 > WWW: http://www.cs.cornell.edu/home/raman/             
 > AIM: TVRaman
 > PGP:    http://www.cs.cornell.edu/home/raman/raman.asc 
 > 
 > -----------------------------------------------------------------------------
 > To unsubscribe from the emacspeak list or change your address on the
 > emacspeak list send mail to "emacspeak-request@xxxxxxxxxxx" with a
 > subject of "unsubscribe" or "help"
 > 

-----------------------------------------------------------------------------
To unsubscribe from the emacspeak list or change your address on the
emacspeak list send mail to "emacspeak-request@xxxxxxxxxxx" with a
subject of "unsubscribe" or "help"