Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 80 lines (61 sloc) 2.324 kB
b78e49b Move `find-face' from poe-19.el to poe.el; abolish poe-19.el.
morioka authored
1 ;;; inv-18.el --- invisible feature implementation for Emacs 18
2
3 ;; Copyright (C) 1995,1996,1997,1998 Free Software Foundation, Inc.
4
5 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
6 ;; Keywords: invisible, text-property, region, Emacs 18
7
8 ;; This file is part of APEL (A Portable Emacs Library).
9
10 ;; This program is free software; you can redistribute it and/or
11 ;; modify it under the terms of the GNU General Public License as
12 ;; published by the Free Software Foundation; either version 2, or (at
13 ;; your option) any later version.
14
15 ;; This program is distributed in the hope that it will be useful, but
16 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 ;; General Public License for more details.
19
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
eefe87e Update FSF's address in GPL notices.
yamaoka authored
22 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
23 ;; Boston, MA 02110-1301, USA.
b78e49b Move `find-face' from poe-19.el to poe.el; abolish poe-19.el.
morioka authored
24
25 ;;; Code:
26
0a654c5 Require 'poe in each submodule.
shuhei authored
27 (require 'poe)
28
29 (defun enable-invisible ()
30 (make-local-variable 'original-selective-display)
31 (setq original-selective-display selective-display)
32 (setq selective-display t))
33
34 (defun disable-invisible ()
35 (setq selective-display
36 (and (boundp 'original-selective-display)
37 original-selective-display)))
38 (defalias 'end-of-invisible 'disable-invisible)
39 (make-obsolete 'end-of-invisible 'disable-invisible)
b78e49b Move `find-face' from poe-19.el to poe.el; abolish poe-19.el.
morioka authored
40
41 (defun invisible-region (start end)
0a654c5 Require 'poe in each submodule.
shuhei authored
42 (let ((buffer-read-only nil)
b78e49b Move `find-face' from poe-19.el to poe.el; abolish poe-19.el.
morioka authored
43 (modp (buffer-modified-p)))
44 (if (save-excursion
45 (goto-char (1- end))
0a654c5 Require 'poe in each submodule.
shuhei authored
46 (eq (following-char) ?\n))
47 (setq end (1- end)))
b78e49b Move `find-face' from poe-19.el to poe.el; abolish poe-19.el.
morioka authored
48 (unwind-protect
0a654c5 Require 'poe in each submodule.
shuhei authored
49 (subst-char-in-region start end ?\n ?\r t)
50 (set-buffer-modified-p modp))))
b78e49b Move `find-face' from poe-19.el to poe.el; abolish poe-19.el.
morioka authored
51
52 (defun visible-region (start end)
0a654c5 Require 'poe in each submodule.
shuhei authored
53 (let ((buffer-read-only nil)
b78e49b Move `find-face' from poe-19.el to poe.el; abolish poe-19.el.
morioka authored
54 (modp (buffer-modified-p)))
55 (unwind-protect
0a654c5 Require 'poe in each submodule.
shuhei authored
56 (subst-char-in-region start end ?\r ?\n t)
57 (set-buffer-modified-p modp))))
b78e49b Move `find-face' from poe-19.el to poe.el; abolish poe-19.el.
morioka authored
58
59 (defun invisible-p (pos)
60 (save-excursion
61 (goto-char pos)
0a654c5 Require 'poe in each submodule.
shuhei authored
62 (eq (following-char) ?\r)))
b78e49b Move `find-face' from poe-19.el to poe.el; abolish poe-19.el.
morioka authored
63
64 (defun next-visible-point (pos)
65 (save-excursion
66 (goto-char pos)
67 (end-of-line)
68 (if (eq (following-char) ?\n)
0a654c5 Require 'poe in each submodule.
shuhei authored
69 (forward-char))
70 (point)))
b78e49b Move `find-face' from poe-19.el to poe.el; abolish poe-19.el.
morioka authored
71
72
73 ;;; @ end
74 ;;;
75
d52455a Add product information.
keiichi authored
76 (require 'product)
77 (product-provide (provide 'inv-18) (require 'apel-ver))
b78e49b Move `find-face' from poe-19.el to poe.el; abolish poe-19.el.
morioka authored
78
79 ;;; inv-18.el ends here
Something went wrong with that request. Please try again.