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

Module code style question.

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@pobox.une.edu.au> 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@pobox.une.edu.au
    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@cs.vassar.edu" with a subject of
    Tim> "unsubscribe" or "help"

Best Regards,

Email:  raman@cs.cornell.edu
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@cs.vassar.edu" with a
subject of "unsubscribe" or "help"