(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 <shuhei@aqua.ocn.ne.jp>
+ * 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 <shuhei@aqua.ocn.ne.jp>
+
* README.en (Version specific information): New section.
* pcustom.el [old custom]: Refer to it.
;;; 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
;;; 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)))
;;; 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))))
;;; 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