help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Defining functions on the fly


From: Andreas Röhler
Subject: Re: Defining functions on the fly
Date: Tue, 16 Jun 2015 11:42:53 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0


Am 16.06.2015 um 09:01 schrieb Tassilo Horn:
Andreas Röhler <andreas.roehler@easy-emacs.de> writes:

i'm probably misunderstanding you, but does:
     (defun (intern (concat "current-prefix-" foo) ...
do what you need?
(defalias (intern (concat "current-prefix-" foo) ...) ...) can work, but
not with defun.  In any case, some concrete example of what he needs to
do would go a long way.


          Stefan
Currently Emacs provides some scheme to fontify source code and some
basic moves: linewise, symbol, word, paragraph, sexp.

There is no idea of statement, block/loop or expression and a poor
top-level --beginning/end-of-defun.
There is: `forward-sexp' and `backward-sexp'.

Expect sexp-navigation behaving the the following way:

- if inside a form, go to the end resp. start
- if at end of form, forward same level if form exist, or get level following point, or EOB - if at beginning of form, backward same level if form exist, or get level preceding point, or BOB

Resp. when inside a literal, go to start resp. end.
When in inside a comment, leave it, treat it like whitespace, repeat the command.

Beside other shortcomings, for now docstring of forward-sexp says:

"This command assumes point is not in a string or comment."

A restriction, which is not acceptable.




reply via email to

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