emacs-devel
[Top][All Lists]
Advanced

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

Re: Abbrev tables in elisp with some extra stuff


From: Richard Stallman
Subject: Re: Abbrev tables in elisp with some extra stuff
Date: Wed, 17 Oct 2007 16:48:50 -0400

    +;; - abbrevs could have a `predicate' so you can disable them in strings 
and
    +;;   comments, for example.  Maybe the predicate should be on the table
    +;;   rather than on individual abbrevs.  This may be enough to cover the
    +;;   above request for context-dependent abbrevs.

If you implement that on individual abbrevs and on tables,
it will do both jobs.

    +(defun abbrev-get (sym prop)
    +  (let ((plist (symbol-plist sym)))
    +    (if (listp plist)
    +        (plist-get plist prop)
    +      (if (eq 'count prop) plist))))

That needs a doc string, and the doc string needs
to explain the various types of arguments that are allowed.

    +    ;; The loop has to be done via recursion rather than a `while'.

Please add an explanation of why.

    +(defun abbrev-set-member (elem set)

That needs a doc string, and it should fully explain
what SET can look like.

    +(defun abbrev--active-tables (&optional tables)

That needs a doc string.
It should state the purpose of having the argument TABLES.

Why not just write (or tables (abbrev--active-tables))?

(I don't mind using `abbrev--' to start a function name,
because it has `abbrev' at the beginning.)

    +(defun write--abbrev (sym)

I do dislike `--' here since it doesn't start with `abbrev'.

Also please give this a doc string.




reply via email to

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