Search found 3 matches

by spacebat
Sun Aug 19, 2012 4:33 am
Forum: Emacs Lisp
Topic: Operator Overloading
Replies: 2
Views: 10036

Re: Operator Overloading

You probably know this by now, but as + is a primitive function implemented in C, it is not wise to try to redefine or advise it. Though normal functions will see the new definition, other primitive functions will still call the underlying + directly.
Dogs and cats, living together.
by spacebat
Sun Aug 19, 2012 12:56 am
Forum: Emacs Lisp
Topic: Lisp Evaluation
Replies: 4
Views: 11765

Re: Lisp Evaluation

Good explanation, but there's a minor distinction when it comes to emacs lisp that one doesn't notice much in typical use. If you want to access the function associated with a symbol when the reference would otherwise select the data, preface the symbol with pound-tick: #'SYMBOL. That's true for com...
by spacebat
Sat Aug 18, 2012 11:28 pm
Forum: Emacs Lisp
Topic: What is the elisp idiom for do until end of buffer?
Replies: 1
Views: 6623

Re: What is the elisp idiom for do until end of buffer?

search-forward will throw an error by default if the string is not found. This will throw control out of your function which isn't catching errors. To use search-forward in a loop it is best to set the NOERROR argument to t: (while (search-forward "\t" nil t) ...) The documentation for end-of-line s...