From: shuhei Date: Fri, 12 Nov 1999 12:43:46 +0000 (+0000) Subject: Require 'poe in each submodule. X-Git-Tag: apel-shubit-10_0~30 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16557e2f69b509665fe06976f8babdf16caf1a14;p=elisp%2Fapel.git Require 'poe in each submodule. (enable-invisible): Changed to function. (disable-invisible): Renamed from `end-of-invisible'; Changed to function. (end-of-invisible): Make obsolete. --- diff --git a/ChangeLog b/ChangeLog index 9407177..9426b1a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 1999-11-12 Shuhei KOBAYASHI + * inv-18.el, inv-19.el, inv-xemacs.el: + Require 'poe in each submodule. + (enable-invisible): Changed to function. + (disable-invisible): Renamed from `end-of-invisible'. + Changed to function. + (end-of-invisible): Make obsolete. + +1999-11-12 Shuhei KOBAYASHI + * README.en (Version specific information): New section. * pcustom.el [old custom]: Refer to it. diff --git a/inv-18.el b/inv-18.el index 21e54ca..2cd7737 100644 --- a/inv-18.el +++ b/inv-18.el @@ -24,57 +24,50 @@ ;;; Code: -(defmacro enable-invisible () - (` - (progn - (make-local-variable 'original-selective-display) - (setq original-selective-display selective-display) - (setq selective-display t) - ))) - -(defmacro end-of-invisible () - (` (setq selective-display - (if (boundp 'original-selective-display) - original-selective-display)) - )) +(require 'poe) + +(defun enable-invisible () + (make-local-variable 'original-selective-display) + (setq original-selective-display selective-display) + (setq selective-display t)) + +(defun disable-invisible () + (setq selective-display + (and (boundp 'original-selective-display) + original-selective-display))) +(defalias 'end-of-invisible 'disable-invisible) +(make-obsolete 'end-of-invisible 'disable-invisible) (defun invisible-region (start end) - (let ((buffer-read-only nil) ;Okay even if write protected. + (let ((buffer-read-only nil) (modp (buffer-modified-p))) (if (save-excursion (goto-char (1- end)) - (eq (following-char) ?\n) - ) - (setq end (1- end)) - ) + (eq (following-char) ?\n)) + (setq end (1- end))) (unwind-protect - (subst-char-in-region start end ?\n ?\^M t) - (set-buffer-modified-p modp) - ))) + (subst-char-in-region start end ?\n ?\r t) + (set-buffer-modified-p modp)))) (defun visible-region (start end) - (let ((buffer-read-only nil) ;Okay even if write protected. + (let ((buffer-read-only nil) (modp (buffer-modified-p))) (unwind-protect - (subst-char-in-region start end ?\^M ?\n t) - (set-buffer-modified-p modp) - ))) + (subst-char-in-region start end ?\r ?\n t) + (set-buffer-modified-p modp)))) (defun invisible-p (pos) (save-excursion (goto-char pos) - (eq (following-char) ?\^M) - )) + (eq (following-char) ?\r))) (defun next-visible-point (pos) (save-excursion (goto-char pos) (end-of-line) (if (eq (following-char) ?\n) - (forward-char) - ) - (point) - )) + (forward-char)) + (point))) ;;; @ end diff --git a/inv-19.el b/inv-19.el index 3f99a03..7a8dd36 100644 --- a/inv-19.el +++ b/inv-19.el @@ -24,34 +24,31 @@ ;;; Code: -(defmacro enable-invisible ()) +(require 'poe) -(defmacro end-of-invisible ()) +(defun enable-invisible ()) +(defun disable-invisible ()) +(defalias 'end-of-invisible 'disable-invisible) +(make-obsolete 'end-of-invisible 'disable-invisible) (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) - ) + (eq (following-char) ?\n)) + (setq end (1- end))) + (put-text-property start end 'invisible t)) (defun visible-region (start end) - (put-text-property start end 'invisible nil) - ) + (put-text-property start end 'invisible nil)) (defun invisible-p (pos) - (get-text-property pos 'invisible) - ) + (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) - ) + (forward-char)) (point))) diff --git a/inv-xemacs.el b/inv-xemacs.el index c6c056b..b17b3fd 100644 --- a/inv-xemacs.el +++ b/inv-xemacs.el @@ -25,39 +25,36 @@ ;;; Code: -(defmacro enable-invisible ()) +(require 'poe) -(defmacro end-of-invisible ()) +(defun enable-invisible ()) +(defun disable-invisible ()) +(defalias 'end-of-invisible 'disable-invisible) +(make-obsolete 'end-of-invisible 'disable-invisible) (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) - ) + (setq start (1+ start))) + (put-text-property start end 'invisible t)) (defun visible-region (start end) - (put-text-property start end 'invisible nil) - ) + (put-text-property start end 'invisible nil)) (defun invisible-p (pos) (if (save-excursion (goto-char pos) (eq (following-char) ?\n)) - (setq pos (1+ pos)) - ) - (get-text-property pos 'invisible) - ) + (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)) - ) + (setq pos (1+ pos))) (or (next-single-property-change pos 'invisible) (point-max)))) diff --git a/invisible.el b/invisible.el index 265ee92..44eaec1 100644 --- a/invisible.el +++ b/invisible.el @@ -24,17 +24,13 @@ ;;; Code: -(require 'poe) - -(cond ((featurep 'xemacs) - (require 'inv-xemacs) - ) - ((>= emacs-major-version 19) - (require 'inv-19) - ) - (t - (require 'inv-18) - )) +(cond + ((featurep 'xemacs) + (require 'inv-xemacs)) + ((>= emacs-major-version 19) + (require 'inv-19)) + (t + (require 'inv-18))) ;;; @ end