From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stefan Monnier" Newsgroups: gmane.emacs.devel Subject: Re: bug in forward-visible-line: Patch Date: Thu, 22 May 2003 08:56:43 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200305221256.h4MCuhjv003998@rum.cs.yale.edu> References: <200305220443.h4M4h4w10124@eel.dms.auburn.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1053610118 18330 80.91.224.249 (22 May 2003 13:28:38 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 22 May 2003 13:28:38 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu May 22 15:28:36 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19Iq65-0004bU-00 for ; Thu, 22 May 2003 15:27:05 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19IqHM-0004Yw-00 for ; Thu, 22 May 2003 15:38:44 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19Iq3g-0006dn-4v for emacs-devel@quimby.gnus.org; Thu, 22 May 2003 09:24:36 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19Iprt-0003AE-Ty for emacs-devel@gnu.org; Thu, 22 May 2003 09:12:25 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19IpfK-0000mg-5p for emacs-devel@gnu.org; Thu, 22 May 2003 08:59:57 -0400 Original-Received: from rum.cs.yale.edu ([128.36.229.169]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19Ipci-0008Hq-SC for emacs-devel@gnu.org; Thu, 22 May 2003 08:56:44 -0400 Original-Received: from rum.cs.yale.edu (localhost [127.0.0.1]) by rum.cs.yale.edu (8.12.8/8.12.8) with ESMTP id h4MCuhx6004000; Thu, 22 May 2003 08:56:43 -0400 Original-Received: (from monnier@localhost) by rum.cs.yale.edu (8.12.8/8.12.8/Submit) id h4MCuhjv003998; Thu, 22 May 2003 08:56:43 -0400 X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 Original-To: Luc Teirlinck X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:14088 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:14088 > ! (if (if (eq buffer-invisibility-spec t) > ! prop > ! (or (memq prop buffer-invisibility-spec) > ! (assq prop buffer-invisibility-spec))) BTW, how about a `invisible-p' function that does above ? Especially since the above is wrong (the assq might match a cons cell like (foo . nil) which says that it's *not* invisible). Also while I'm talking about the invisible property. A lot of code uses t as an invisible value that is assumed to always be invisible and nil for the opposite. A recent change makes buffer-invisibility-spec always contain t so that t should indeed always be invisible, but I think a better change is to make the invisibility check something like (cond ((eq buffer-invisibility-spec t) val) ((null val) 'visible) ((eq val t) 'invisible) (t (or (memq prop buffer-invisibility-spec) (cdr (assq prop buffer-invisibility-spec))))) where the change is that nil and t are special values that do not depend on buffer-invisibility-spec. Stefan