From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: lawrence mitchell Newsgroups: gmane.emacs.help Subject: Re: vbb-mode for GNU Emacs Date: Thu, 05 Sep 2002 13:20:33 +0100 Organization: funfunfun Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: <2f83b0dc.0209050344.53b5fb21@posting.google.com> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1031229269 2350 127.0.0.1 (5 Sep 2002 12:34:29 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 5 Sep 2002 12:34:29 +0000 (UTC) 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 17mvq8-0000bl-00 for ; Thu, 05 Sep 2002 14:34:28 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17mvri-0000C0-00; Thu, 05 Sep 2002 08:36:06 -0400 Original-Path: shelby.stanford.edu!nntp.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!m983-mp1.cvx1-b.swa.dial.ntli.NET!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 40 Original-NNTP-Posting-Host: m983-mp1.cvx1-b.swa.dial.ntli.net (213.105.235.215) Original-X-Trace: fu-berlin.de 1031228606 58743446 213.105.235.215 (16 [97657]) X-No-Yes: No Mail-Copies-To: nobody User-Agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2.90 (i386-mingw-windows98.2222) Cancel-Lock: sha1:FfgtANWV+KA0siWHy5rmrskr7TI= Original-Xref: nntp.stanford.edu gnu.emacs.help:104502 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:1062 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:1062 Ludwig Weinzierl wrote: > Hello, > there is a minor-mode for X-Emacs called vvb-mode which shows a > vertikal bar in a certain column (eg column 72). > Sadly it works only with X-Emacs. > 1. Is there a similar package for GNU Emacs? > 2. Does anyone know of version of vbb-mode.el for GNU Emacs? > 3. Has anyone an idea how to get this part of code working with GNU > emacs? GNU Emacs uses overlays rather than extents, (which, I believe, are somewhat less efficient, however, no matter). Hence, you have to change two functions in vvb-mode. `vvb-show' and `vvb-hide'. If you replace `vvb-hide' with the following definition: `cl-map-overlays' is part of the cl package which ships with Emacs. (defun vvb-hide () "Hide the transient visual vertical bar if any." (if vvb-visible-p (progn (setq vvb-visible-p nil) (cl-map-overlays #'(lambda (overlay dummy) (delete-overlay overlay)) nil nil nil 'vvb)))) [...] > (set-extent-properties (make-extent b e) > (list 'face vvb-face > 'vvb t)) Change these lines to: (let ((overlay (make-overlay b e))) (overlay-put overlay 'face vvb-face) (overlay-put overlay 'vvb t)) [...] -- lawrence mitchell