From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: Defining functions on the fly Date: Tue, 16 Jun 2015 09:01:44 +0200 Message-ID: <87lhfkjfvr.fsf@gnu.org> References: <557E99BE.2060407@easy-emacs.de> <557FBB3C.8060208@easy-emacs.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1434438130 4012 80.91.229.3 (16 Jun 2015 07:02:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 16 Jun 2015 07:02:10 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Andreas =?utf-8?Q?R=C3=B6hler?= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jun 16 09:02:04 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Z4ksl-0005tf-HC for geh-help-gnu-emacs@m.gmane.org; Tue, 16 Jun 2015 09:02:03 +0200 Original-Received: from localhost ([::1]:38117 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4ksk-0002kR-TN for geh-help-gnu-emacs@m.gmane.org; Tue, 16 Jun 2015 03:02:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59393) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4ksX-0002je-7O for help-gnu-emacs@gnu.org; Tue, 16 Jun 2015 03:01:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4ksU-0004fw-0b for help-gnu-emacs@gnu.org; Tue, 16 Jun 2015 03:01:49 -0400 Original-Received: from deliver.uni-koblenz.de ([141.26.64.15]:39791) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4ksT-0004ej-Qv for help-gnu-emacs@gnu.org; Tue, 16 Jun 2015 03:01:45 -0400 Original-Received: from thinkpad-t440p (dhcp196.uni-koblenz.de [141.26.71.196]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by deliver.uni-koblenz.de (Postfix) with ESMTPSA id BF7AE1A82EC; Tue, 16 Jun 2015 09:01:44 +0200 (CEST) Mail-Followup-To: Andreas =?utf-8?Q?R=C3=B6hler?= , help-gnu-emacs@gnu.org In-Reply-To: <557FBB3C.8060208@easy-emacs.de> ("Andreas \=\?utf-8\?Q\?R\=C3\=B6h\?\= \=\?utf-8\?Q\?ler\=22's\?\= message of "Tue, 16 Jun 2015 07:59:24 +0200") User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 141.26.64.15 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:104969 Archived-At: Andreas R=C3=B6hler 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'. Although the name sexp is a bit lisp-specific, sexp-based motion has been implemented for more C-like languages, too. For example, it works well for shell scripts and Ruby programs. See (info "(elisp) SMIE") for how to add sexp-based motion to your favorite programming language mode. Bye, Tassilo