From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andrea Crotti Newsgroups: gmane.emacs.help Subject: looking-at function behaviour Date: Sun, 06 Jun 2010 16:59:31 +0200 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1275836415 17287 80.91.229.12 (6 Jun 2010 15:00:15 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 6 Jun 2010 15:00:15 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jun 06 17:00:14 2010 connect(): No such file or directory Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OLHKf-00018Z-FN for geh-help-gnu-emacs@m.gmane.org; Sun, 06 Jun 2010 17:00:13 +0200 Original-Received: from localhost ([127.0.0.1]:48184 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OLHKf-0000ly-0g for geh-help-gnu-emacs@m.gmane.org; Sun, 06 Jun 2010 11:00:13 -0400 Original-Received: from [140.186.70.92] (port=48162 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OLHKD-0000lQ-Dl for help-gnu-emacs@gnu.org; Sun, 06 Jun 2010 10:59:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OLHKC-0001g4-B7 for help-gnu-emacs@gnu.org; Sun, 06 Jun 2010 10:59:45 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:52955) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OLHKC-0001fi-4r for help-gnu-emacs@gnu.org; Sun, 06 Jun 2010 10:59:44 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OLHK9-0000e8-2p for help-gnu-emacs@gnu.org; Sun, 06 Jun 2010 16:59:41 +0200 Original-Received: from p508a786c.dip.t-dialin.net ([80.138.120.108]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 06 Jun 2010 16:59:41 +0200 Original-Received: from andrea.crotti.0 by p508a786c.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 06 Jun 2010 16:59:41 +0200 X-Injected-Via-Gmane: http://gmane.org/ connect(): No such file or directory Original-Lines: 20 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: p508a786c.dip.t-dialin.net User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (darwin) Cancel-Lock: sha1:cTdgWiVQa9TjBS9d7C8LlUCgl+4= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:73833 Archived-At: I don't understand how I should use the looking-at function, from what I see in the doc is not what I see happening. --8<---------------cut here---------------start------------->8--- (when (not (looking-at closing-char)) (insert closing-char)) (newline-force)))) --8<---------------cut here---------------end--------------->8--- With this code I would like to - see if a char is before the end of line - insert it if not Is quite simple but it doesn't work. And even trying now on the fly (looking-at "a") ;; "a" Is anyway always nil, how then am I supposed to do it given that this is the function which reading at the info page should be used?