From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Karl Eichwalder Newsgroups: gmane.emacs.help Subject: Re: No line break within [[foo bar]] (wikipedia) Date: Sun, 20 Apr 2003 11:35:45 +0200 Organization: The Moon On Earth Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <84of31ftpb.fsf@lucy.is.informatik.uni-duisburg.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1050834029 24782 80.91.224.249 (20 Apr 2003 10:20:29 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Apr 2003 10:20:29 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Sun Apr 20 12:20:16 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 197Bvj-0006R4-00 for ; Sun, 20 Apr 2003 12:20:16 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 197Bw9-0000H2-02 for gnu-help-gnu-emacs@m.gmane.org; Sun, 20 Apr 2003 06:20:41 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.stueberl.de!newsfeed.r-kom.de!news-nue1.dfn.de!uni-erlangen.de!elvis.franken.de!chico.franken.de!news.franken.de!gnu.franken.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 39 Original-NNTP-Posting-Host: tux.gnu.franken.de Original-X-Trace: tux.gnu.franken.de 1050831345 5034 192.168.1.3 (20 Apr 2003 09:35:45 GMT) Original-X-Complaints-To: newsadm@gnu.franken.de Original-NNTP-Posting-Date: Sun, 20 Apr 2003 09:35:45 +0000 (UTC) Mail-copies-to: never User-Agent: Gnus/5.090018 (Oort Gnus v0.18) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:vmAKZcqw/+wVLJZkaG7ohxgy5eM= Original-Xref: shelby.stanford.edu gnu.emacs.help:112135 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:8634 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:8634 kai.grossjohann@gmx.net (Kai Großjohann) writes: Thanks for advise! > I guess it's obvious how to change the code to look for * or # at > beginning of line. So I guess you did that, but it didn't work. > What exactly did you try, and what happened when you tried it? > > (save-excursion > (beginning-of-line) > (member (char-after (point)) '(?\* ?\#))) > ...seems to be code that looks whether the line starts with * or #. I tried serveral way (w/o understanding what I'm actually doing); here is the last experiment: (defun fill-list-item-nobreak-p () (save-excursion (beginning-of-line) (member (char-after (point)) '(?\* ?\#)))) (add-to-list 'fill-nobreak-predicate 'fill-list-item-nobreak-p) The result is (let's assume the limit is at the word "limit"): * this is a very long line, longer than the fill limit ==> * this is a very long line, longer than the fill limit Thus Emacs will break the line after "* " and that's not what I want. -- | ,__o http://www.gnu.franken.de/ke/ | _-\_<, ke@suse.de (work) / keichwa@gmx.net (home) | (*)/'(*)