From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Andreas_R=F6hler?= Newsgroups: gmane.emacs.help Subject: Re: Using backward-char non-interactively Date: Tue, 31 Dec 2013 19:10:36 +0100 Message-ID: <52C3089C.3080205@easy-emacs.de> References: <20131231145843.661d4304@aga-netbook> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1388513288 28209 80.91.229.3 (31 Dec 2013 18:08:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 31 Dec 2013 18:08:08 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Dec 31 19:08:14 2013 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 1Vy3ji-0003ai-22 for geh-help-gnu-emacs@m.gmane.org; Tue, 31 Dec 2013 19:08:14 +0100 Original-Received: from localhost ([::1]:35280 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vy3jh-0003YI-IS for geh-help-gnu-emacs@m.gmane.org; Tue, 31 Dec 2013 13:08:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vy3jR-0003Y9-Lp for help-gnu-emacs@gnu.org; Tue, 31 Dec 2013 13:08:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vy3jK-0007OP-C6 for help-gnu-emacs@gnu.org; Tue, 31 Dec 2013 13:07:57 -0500 Original-Received: from moutng.kundenserver.de ([212.227.17.9]:59888) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vy3jK-0007OC-2n for help-gnu-emacs@gnu.org; Tue, 31 Dec 2013 13:07:50 -0500 Original-Received: from purzel.sitgens (brln-4d0c660a.pool.mediaWays.net [77.12.102.10]) by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis) id 0LxLzO-1VMNIn2yfi-016FOR; Tue, 31 Dec 2013 19:07:48 +0100 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 In-Reply-To: <20131231145843.661d4304@aga-netbook> X-Provags-ID: V02:K0:4d0BPYHewxoViKqgxW9+dy2SSDydsWy/L8Z5XCxvSs3 Am57suiJGCxezfWswOlprNOSUOJ55i7miWE8TMmcEoJwd8AQSo //iaGt+4N7vfyCTfZxS1ixlNe04uazk2g+Au589EyVAeJt3fid Joh/HEzzj5YQoauj0MAApoiBlE63QoYTVn7fjbv8I6mCxQSXLB OjoV9ZDWUI4vFnOF7oWqH7gf8hjrtGWLvvm+bcR6nLZQyqJ7xH kInH+XE99ipfwP1FqQZcIBie94q2aDU85jgW3LGY+2ZdEu1J/l 4X/D93+qk5ubIPDaoW4shmb1aYf8vFRvilOkiPKoXZWhtaCSqd +UpGjwmW+sQALbKjF5zM= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 212.227.17.9 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:95217 Archived-At: Am 31.12.2013 14:58, schrieb Marcin Borkowski: > Hi, > > is it ok to use backward-char in elisp programs assuming that I did > check that I'm not at beginning of buffer? Or is it better to use > (goto-char (1- point)) or something like that? Or maybe it doesn't > matter? ("Better" may be in terms of style, speed, or side effects, > like cluttering the *Messages* buffer.) > > TIA, > Hi, answer depends from the case. In general it's okay. If you must avoid any messages, would use (unless (bobp) Here a from to try it: (funcall (lambda ()(goto-char 1)(unless (bobp)(backward-char))))