help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

vbb-mode for GNU Emacs


From: Ludwig Weinzierl
Subject: vbb-mode for GNU Emacs
Date: 5 Sep 2002 04:44:30 -0700

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?

 ;; show the bar
  (let ((column (current-column))
        (case-fold-search nil)
        )
    (if (>= column vvb-column)
        (if vvb-visible-p
            nil
          (let ((start (window-start))
                (end (window-end))
                (cnt 0)
                )
            (save-excursion
              (goto-char start)
              (while (<= (point) end)
                (move-to-column vvb-column)
                (if (<= vvb-column (current-column))
                    (let (b e)
                      (setq b (point))
                      (if vvb-right-on-eol-p
                          (progn (end-of-line)
                                 (setq e (point)))
                        (setq e (1+ b)))
                      
                      (set-extent-properties (make-extent b e)
                                             (list 'face vvb-face
                                                   'vvb t))
                      (setq cnt (1+ cnt))))
                
                (or (search-forward "\n" nil t)
                    (setq end -1))))
            
            (if (> cnt 0)
                (setq vvb-visible-p t))
            ))

      ;;else - clean up previous act if any
      (vvb-hide))
    )
)

;; attach it to the XEmacs system
(or (assoc 'vvb-mode minor-mode-alist)
    (setq minor-mode-alist (cons '(vvb-mode " VBar")
minor-mode-alist)))

This is a code snippet from an early version of vvb-mode.el available
at
http://www.ee.ed.ac.uk/~ssp/Info/Email_and_News/Emacs/msg00036.html
The whole file is not very long, and the rest of it is pretty straight
forward.
If I load vbb-mode.el emacs does not complain, its just that the bar
does not
show up.

There are more recent versions of it, but i don't need the
functionality.
The more recent versions give me some errors with GNU Emacs.

Ludwig Weinzierl


reply via email to

[Prev in Thread] Current Thread [Next in Thread]