]> code.delx.au - gnu-emacs/blobdiff - lisp/longlines.el
(font-lock-extra-managed-props, font-lock-keywords, font-lock-maximum-size,
[gnu-emacs] / lisp / longlines.el
index e9c300fdbec0e720f8b8a6d103d9b9af2a5bbd8a..d51effdb7e29b4561ae3edf565e1aa07fe74729e 100644 (file)
@@ -1,6 +1,6 @@
 ;;; longlines.el --- automatically wrap long lines
 
-;; Copyright (C) 2000, 2001, 2004, 2005 by Free Software Foundation, Inc.
+;; Copyright (C) 2000, 2001, 2005 Free Software Foundation, Inc.
 
 ;; Authors:    Kai Grossjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
 ;;             Alex Schroeder <alex@gnu.org>
@@ -22,8 +22,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
@@ -60,7 +60,8 @@ with differing widths."
   :type 'boolean)
 
 (defcustom longlines-show-hard-newlines nil
-  "*Non-nil means each hard newline is marked with a symbol.
+  "*Non-nil means each hard newline is marked on the screen.
+\(The variable `longlines-show-effect' controls what they look like.)
 You can also enable the display temporarily, using the command
 `longlines-show-hard-newlines'"
   :group 'longlines
@@ -93,12 +94,12 @@ In Long Lines mode, long lines are wrapped if they extend beyond
 `fill-column'.  The soft newlines used for line wrapping will not
 show up when the text is yanked or saved to disk.
 
-If `longlines-auto-wrap' is non-nil, lines are automatically
+If the variable `longlines-auto-wrap' is non-nil, lines are automatically
 wrapped whenever the buffer is changed.  You can always call
 `fill-paragraph' to fill individual paragraphs.
 
-If `longlines-show-hard-newlines' is non-nil, hard newlines will
-be marked by a symbol."
+If the variable `longlines-show-hard-newlines' is non-nil, hard newlines
+are indicated with a symbol."
   :group 'longlines :lighter " ll"
   (if longlines-mode
       ;; Turn on longlines mode
@@ -153,11 +154,6 @@ major mode changes."
 
 ;; Showing the effect of hard newlines in the buffer
 
-(defface longlines-visible-face
-  '((t (:background "red")))
-  "Face used to make hard newlines visible in `longlines-mode'."
-  :group 'longlines)
-
 (defun longlines-show-hard-newlines (&optional arg)
   "Make hard newlines visible by adding a face.
 With optional argument ARG, make the hard newlines invisible again."
@@ -174,20 +170,20 @@ With optional argument ARG, make the hard newlines invisible again."
   "Make hard newlines between BEG and END visible."
   (let* ((pmin (min beg end))
          (pmax (max beg end))
-         (pos (text-property-any pmin pmax 'hard t)))
+         (pos (text-property-not-all pmin pmax 'hard nil)))
     (while pos
       (put-text-property pos (1+ pos) 'display
                          (copy-sequence longlines-show-effect))
-      (setq pos (text-property-any (1+ pos) pmax 'hard t)))))
+      (setq pos (text-property-not-all (1+ pos) pmax 'hard nil)))))
 
 (defun longlines-unshow-hard-newlines ()
   "Make hard newlines invisible again."
   (interactive)
   (setq longlines-showing nil)
-  (let ((pos (text-property-any (point-min) (point-max) 'hard t)))
+  (let ((pos (text-property-not-all (point-min) (point-max) 'hard nil)))
     (while pos
       (remove-text-properties pos (1+ pos) '(display))
-      (setq pos (text-property-any (1+ pos) (point-max) 'hard t)))))
+      (setq pos (text-property-not-all (1+ pos) (point-max) 'hard nil)))))
 
 ;; Wrapping the paragraphs.