From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Using overlay in register Date: Fri, 19 Mar 2004 23:49:04 -0500 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <20040318.193346.21592706.jet@gyve.org> Reply-To: rms@gnu.org NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1079758751 6711 80.91.224.253 (20 Mar 2004 04:59:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 20 Mar 2004 04:59:11 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sat Mar 20 05:59:07 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1B4YZf-0004fN-00 for ; Sat, 20 Mar 2004 05:59:07 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1B4YZe-0000C0-00 for ; Sat, 20 Mar 2004 05:59:07 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B4YY3-0005Oq-RR for emacs-devel@quimby.gnus.org; Fri, 19 Mar 2004 23:57:27 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1B4YV0-0004Nx-2u for emacs-devel@gnu.org; Fri, 19 Mar 2004 23:54:18 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1B4YUF-00045Z-Dz for emacs-devel@gnu.org; Fri, 19 Mar 2004 23:54:03 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B4YTv-0003se-Vr for emacs-devel@gnu.org; Fri, 19 Mar 2004 23:53:11 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.24) id 1B4YPw-0007h8-Ef; Fri, 19 Mar 2004 23:49:04 -0500 Original-To: Masatake YAMATO In-reply-to: <20040318.193346.21592706.jet@gyve.org> (message from Masatake YAMATO on Thu, 18 Mar 2004 19:33:46 +0900 (JST)) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:20629 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:20629 This is a very good idea. Thanks for working on it. I see a possible bug here: +(defun register-put-overlay-at-point (register) + "Put a overlay associated with REGISTER at the point." + (let ((overlay (make-overlay (point) + (1+ (point)) + (current-buffer) This will get an error at the end of the buffer. What should it do at the end? Make an empty overlay? It could have a before-string, perhaps. +(defun register-get-overlay-position (overlay) + "Get the position for OVERLAY." + (min (overlay-start overlay) (overlay-end overlay))) What's the purpose of using min here? Why not just use overlay-start? (In some places you did so.)