CVS update by jaalto packages/xemacs-packages/text-modes ...
xemacs-cvs at xemacs.org
xemacs-cvs at xemacs.org
Sat Nov 18 12:18:49 EST 2006
User: jaalto
Date: 06/11/18 18:18:49
Modified: packages/xemacs-packages/text-modes ChangeLog folding.el
Log:
- folding.el: Applied patch by Jeremy Hankins <nowan A T nowan org>,
Added VCS URL header to the beginning for canonnical location.
Updated maintainer section. Fixed Copyright years.
Revision Changes Path
1.162 +12 -3 XEmacs/packages/xemacs-packages/text-modes/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/text-modes/ChangeLog,v
retrieving revision 1.161
retrieving revision 1.162
diff -u -p -r1.161 -r1.162
--- ChangeLog 2006/11/02 07:51:02 1.161
+++ ChangeLog 2006/11/18 17:18:48 1.162
@@ -1,3 +1,12 @@
+2006-11-18 root <jari.aalto at cante.net>
+
+ * folding.el: Applied patch by Jeremy Hankins <nowan A T nowan org>,
+ which adds variable `folding-narrow-by-default'. The patch affects
+ mostly `folding-shift-in'. This makes it possible to
+ advise viper-search to open folds. Thanks.
+ Added VCS URL header to the beginning for canonnical location.
+ Updated maintainer section. Fixed Copyright years.
+
2006-11-02 Norbert Koch <viteno at xemacs.org>
* Makefile (VERSION): XEmacs package 1.91 released.
@@ -18,7 +27,7 @@
2005-09-14 Jari Aalto <jari aalto A T cante net>
- * folding.el
+ * folding.el
(top level): Updated Copyright years and its information.
(folding-package-url-location): Updated URL
to point to XEmacs CVS server.
@@ -199,7 +208,7 @@
(folding-check-folded): Added check for \r character, which
signifies collapsed folds. This fixes bug (C-x s) where buffer's folds
were forced to closed state if folding mode was active in some other
- buffer. Function `folding-mode-write-file' did that, but the
+ buffer. Function `folding-mode-write-file' did that, but the
impulse came from `folding-check-folded'.
2004-05-19 Norbert Koch <viteno at xemacs.org>
@@ -220,7 +229,7 @@
-- Use spam protective addresses
-- Merged in changes made by 2003-11-12 Adrian Aichner
- from XEmacs tree 1.15; Typo fixes for docstrings and comments.
+ from XEmacs tree 1.15; Typo fixes for docstrings and comments.
-- Returned to old bug and solved it in a better way (preserve
region) by using different expansion macros for XEmacs and Emacs.
See See
1.22 +53 -30 XEmacs/packages/xemacs-packages/text-modes/folding.el
Index: folding.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/text-modes/folding.el,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -p -r1.21 -r1.22
--- folding.el 2005/09/14 05:43:36 1.21
+++ folding.el 2006/11/18 17:18:48 1.22
@@ -1,9 +1,11 @@
;;; folding.el --- A folding-editor-like minor mode.
-;; Copyright (C) 2002-2006
-;; Jari Aalto
-;; Copyright (C) 1994-2001
+;; Copyright (C) 2000-2006
+;; Jari Aalto
+;; Copyright (C) 1995-1999
;; Jari Aalto, Anders Lindgren.
+;; Copyright (C) 1994
+;; Jari Aalto
;; Copyright (C) 1992, 1993
;; Jamie Lokier, All rights reserved.
;;
@@ -11,11 +13,11 @@
;; Jari Aalto
;; Anders Lindgren <andersl A T csd.uu dt se>
;; Maintainer: Jari Aalto <jari aalto A T cante dt net>
-;; Anders Lindgren <andersl A T csd.uu dt se>
;; Created: 1992
-;; Version: 2004.1125 (2.117+)
-;; RCS version: $Revision: 1.21 $
-;; Date: $Date: 2005/09/14 05:43:36 $
+;; Version: 2006.1118
+;; VCS version: $Revision: 1.22 $
+;; VCS URL: http://tiny-tools.cvs.sourceforge.net/tiny-tools/tiny-tools/lisp/other/
+;; Date: $Date: 2006/11/18 17:18:48 $
;; Keywords: tools
;;{{{ GPL
@@ -632,13 +634,22 @@
;;{{{ History
;; [person version] = developer and his revision tree number.
+;;
+;; Nov 16 2006 21.4 [jari 3.36-3.37 2006.1118]
+;; - Jeremy Hankins <nowan A T nowan org> sent a patch, which
+;; adds variable `folding-narrow-by-default'. The patch affects
+;; mostly `folding-shift-in'. This makes it possible to
+;; advise viper-search to open folds. Thanks.
+;; - Added VCS URL header to the beginning for canonnical location.
+;; Updated maintainer section.
+;; - Fixed Copyright years.
;;
-;; Nov 25 2004 21.3 [jari 2004.1125]
+;; Nov 25 2004 21.3 [jari 3.35 2004.1125]
;; - non-ascii character removed from bibtex-mode.
;; Changed bib-mode '@comment' => '%'. Closes Debian
;; Bug#282388
;;
-;; Sep 10 2004 21.3 [jari 2.116-2004.0910]
+;; Sep 10 2004 21.3 [jari 2.116 2004.0910]
;; - (folding-fold-region): caused to indent bottom fold
;; some 50 spaces forward in auctex:latex-mode. Disabled
;; running `indent-according-to-mode' while in latex-mode.
@@ -1772,7 +1783,7 @@ with XEmacs.")
(defvar folding-stack nil
"Internal. A list of marker pairs representing folds entered so far.")
-(defvar folding-version (substring "$Revision: 1.21 $" 11 15)
+(defvar folding-version (substring "$Revision: 1.22 $" 11 15)
"Version number of folding.el.")
;;}}}
@@ -2004,7 +2015,9 @@ It attempts to keep the buffer in the sa
(folding-point-folded-p goal))
(folding-shift-in t))
(goto-char goal)))
- (folding-narrow-to-region (point-min) (point-max) t)))
+ (folding-narrow-to-region
+ (and folding-narrow-by-default (point-min))
+ (point-max) t)))
(if (or folding-stack (folding-point-folded-p (point)))
(folding-open-buffer))))))))
@@ -2114,6 +2127,10 @@ started in C mode."
;;; ........................................................ &v-Config ...
+(defvar folding-narrow-by-default t
+ "If t (default) things like isearch will enter folds. If nil the
+folds will be opened, but not entered.")
+
;; Q: should this inherit mouse-yank-at-point's value? maybe not.
(defvar folding-mouse-yank-at-point t
"If non-nil, mouse activities are done at point instead of 'mouse cursor'.
@@ -3604,22 +3621,26 @@ ellipsis), the position of the point in
many folds as necessary are entered to make the surrounding text
visible. This is useful after some commands eg., search commands."
(interactive)
- (let ((goal (point)))
- (if (folding-skip-ellipsis-backward)
- (while (prog2 (beginning-of-line)
- (folding-shift-in t)
- (goto-char goal)))
- (let ((data (folding-show-current-entry noerror t)))
- (and data
- (progn
- (setq folding-stack
- (if folding-stack
- (cons (cons (point-min-marker) (point-max-marker))
- folding-stack)
- '(folded)))
- (folding-set-mode-line)
- (folding-narrow-to-region (car data) (nth 1 data))
- (nth 2 data)))))))
+ (labels
+ ((open-fold nil
+ (let ((data (folding-show-current-entry noerror t)))
+ (and data
+ (progn
+ (when folding-narrow-by-default
+ (setq folding-stack
+ (if folding-stack
+ (cons (cons (point-min-marker) (point-max-marker))
+ folding-stack)
+ '(folded)))
+ (folding-set-mode-line))
+ (folding-narrow-to-region (car data) (nth 1 data)))))))
+ (let ((goal (point)))
+ (while (folding-skip-ellipsis-backward)
+ (beginning-of-line)
+ (open-fold)
+ (goto-char goal))
+ (when (not folding-narrow-by-default)
+ (widen)))))
;;}}}
;;{{{ folding-shift-out
@@ -3764,9 +3785,11 @@ Undo effect of `folding-show-current-ent
(re-search-forward "[\n\C-m]" nil 0 (1- line)))
(let ((goal (point)))
(while (prog2 (beginning-of-line)
- (folding-shift-in t)
- (goto-char goal))))
- (folding-narrow-to-region (point-min) (point-max) t))
+ (folding-shift-in t)
+ (goto-char goal))))
+ (folding-narrow-to-region
+ (and folding-narrow-by-default (point-min))
+ (point-max) t))
;;}}}
More information about the XEmacs-CVS
mailing list