From 317f2654fcdd03837af37d1c766ccddb0c6bd6c5 Mon Sep 17 00:00:00 2001 From: tmorioka Date: Sat, 1 Mar 1997 03:39:01 +0000 Subject: [PATCH] (enable-invisible, end-of-invisible): New macro; copied from emu-19.el. (invisible-region, invisible-p, next-visible-point): New function; copied from emu-19.el and emu-xemacs.el. (visible-region): New function; copied from emu-19.el. --- mime-edit.el | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 67 insertions(+), 2 deletions(-) diff --git a/mime-edit.el b/mime-edit.el index 290784b..d0ee4a5 100644 --- a/mime-edit.el +++ b/mime-edit.el @@ -7,7 +7,7 @@ ;; Maintainer: MORIOKA Tomohiko ;; Created: 1994/08/21 renamed from mime.el ;; Renamed: 1997/2/21 from tm-edit.el -;; Version: $Revision: 0.51 $ +;; Version: $Revision: 0.52 $ ;; Keywords: MIME, multimedia, multilingual, mail, news ;; This file is part of SEMI (SEMI is Emacs MIME Interfaces). @@ -121,7 +121,7 @@ ;;; (defconst mime-edit-RCS-ID - "$Id: mime-edit.el,v 0.51 1997-03-01 02:30:29 tmorioka Exp $") + "$Id: mime-edit.el,v 0.52 1997-03-01 03:39:01 tmorioka Exp $") (defconst mime-edit-version (get-version-string mime-edit-RCS-ID)) @@ -664,6 +664,71 @@ Tspecials means any character that matches with it in header must be quoted.") ) ;;; end +;;; @@ visible/invisible +;;; + +(defmacro enable-invisible ()) + +(defmacro end-of-invisible ()) + +(cond (running-xemacs + (defun invisible-region (start end) + (if (save-excursion + (goto-char start) + (eq (following-char) ?\n) + ) + (setq start (1+ start)) + ) + (put-text-property start end 'invisible t) + ) + (defun invisible-p (pos) + (if (save-excursion + (goto-char pos) + (eq (following-char) ?\n) + ) + (setq pos (1+ pos)) + ) + (get-text-property pos 'invisible) + ) + ) + (defun next-visible-point (pos) + (save-excursion + (if (save-excursion + (goto-char pos) + (eq (following-char) ?\n) + ) + (setq pos (1+ pos)) + ) + (or (next-single-property-change pos 'invisible) + (point-max)) + )) + (t + (defun invisible-region (start end) + (if (save-excursion + (goto-char (1- end)) + (eq (following-char) ?\n) + ) + (setq end (1- end)) + ) + (put-text-property start end 'invisible t) + ) + (defun invisible-p (pos) + (get-text-property pos 'invisible) + ) + (defun next-visible-point (pos) + (save-excursion + (goto-char (next-single-property-change pos 'invisible)) + (if (eq (following-char) ?\n) + (forward-char) + ) + (point) + )) + )) + +(defun visible-region (start end) + (put-text-property start end 'invisible nil) + ) + ;;; @ functions ;;; -- 1.7.10.4