[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/outline 2046e5a 07/15: lisp/outline.el (outline-hi
From: |
Oleh Krehel |
Subject: |
[Emacs-diffs] scratch/outline 2046e5a 07/15: lisp/outline.el (outline-hide-region-body): Rename. |
Date: |
Wed, 28 Jan 2015 11:44:22 +0000 |
branch: scratch/outline
commit 2046e5aeb3fe4c3b2a1422581d8106495092f0a5
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
lisp/outline.el (outline-hide-region-body): Rename.
* lisp/outline.el (outline-hide-region-body): Rename from
`hide-region-body'.
---
lisp/ChangeLog | 6 ++++++
lisp/outline.el | 31 +++++++++++++++++--------------
2 files changed, 23 insertions(+), 14 deletions(-)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c452b31..523df94 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,11 @@
2015-01-28 Oleh Krehel <address@hidden>
+ * outline.el (outline-hide-region-body): Rename from
+ `hide-region-body'.
+ (hide-region-body): Declare as obsolete.
+
+2015-01-28 Oleh Krehel <address@hidden>
+
* outline.el (outline-hide-body): Rename from `hide-body'.
(hide-body): Declare as obsolete.
diff --git a/lisp/outline.el b/lisp/outline.el
index cfc19a0..8105eb1 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -778,12 +778,12 @@ Show the heading too, if it is currently invisible."
(defun outline-hide-body ()
"Hide all body lines in buffer, leaving all headings visible."
(interactive)
- (hide-region-body (point-min) (point-max)))
+ (outline-hide-region-body (point-min) (point-max)))
(define-obsolete-function-alias
'hide-body 'outline-hide-body "25.1")
-(defun hide-region-body (start end)
+(defun outline-hide-region-body (start end)
"Hide all body lines in the region, but not headings."
;; Nullify the hook to avoid repeated calls to `outline-flag-region'
;; wasting lots of time running `lazy-lock-fontify-after-outline'
@@ -791,19 +791,22 @@ Show the heading too, if it is currently invisible."
(let (outline-view-change-hook)
(save-excursion
(save-restriction
- (narrow-to-region start end)
- (goto-char (point-min))
- (if (outline-on-heading-p)
- (outline-end-of-heading)
- (outline-next-preface))
- (while (not (eobp))
- (outline-flag-region (point)
- (progn (outline-next-preface) (point)) t)
- (unless (eobp)
- (forward-char (if (looking-at "\n\n") 2 1))
- (outline-end-of-heading))))))
+ (narrow-to-region start end)
+ (goto-char (point-min))
+ (if (outline-on-heading-p)
+ (outline-end-of-heading)
+ (outline-next-preface))
+ (while (not (eobp))
+ (outline-flag-region (point)
+ (progn (outline-next-preface) (point)) t)
+ (unless (eobp)
+ (forward-char (if (looking-at "\n\n") 2 1))
+ (outline-end-of-heading))))))
(run-hooks 'outline-view-change-hook))
+(define-obsolete-function-alias
+ 'hide-region-body 'outline-hide-region-body "25.1")
+
(defun show-all ()
"Show all of the text in the buffer."
(interactive)
@@ -821,7 +824,7 @@ Show the heading too, if it is currently invisible."
(outline-back-to-heading)
;; Turned off to fix bug reported by Otto Maddox on 22 Nov 2005.
;; (outline-end-of-heading)
- (hide-region-body (point) (progn (outline-end-of-subtree) (point)))))
+ (outline-hide-region-body (point) (progn (outline-end-of-subtree)
(point)))))
(defun show-subtree ()
"Show everything after this heading at deeper levels."
- [Emacs-diffs] branch scratch/outline created (now 8fc5ca4), Oleh Krehel, 2015/01/28
- [Emacs-diffs] scratch/outline e843b77 01/15: lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Set `indent' to 1., Oleh Krehel, 2015/01/28
- [Emacs-diffs] scratch/outline bddf104 02/15: lisp/custom.el (defface): Set indent to 1., Oleh Krehel, 2015/01/28
- [Emacs-diffs] scratch/outline 89d218c 04/15: * outline.el (outline-hide-entry): Rename from `hide-entry'., Oleh Krehel, 2015/01/28
- [Emacs-diffs] scratch/outline 834612f 03/15: lisp/outline.el (outline-mode): Clean up docstring, Oleh Krehel, 2015/01/28
- [Emacs-diffs] scratch/outline d262f73 06/15: lisp/outline.el (outline-hide-body): Rename from `hide-body'., Oleh Krehel, 2015/01/28
- [Emacs-diffs] scratch/outline ada4428 08/15: lisp/outline.el (outline-show-all): Rename from `show-all'., Oleh Krehel, 2015/01/28
- [Emacs-diffs] scratch/outline 2046e5a 07/15: lisp/outline.el (outline-hide-region-body): Rename.,
Oleh Krehel <=
- [Emacs-diffs] scratch/outline a88ca2b 09/15: lisp/outline.el (outline-hide-subtree): Rename from `hide-subtree'., Oleh Krehel, 2015/01/28
- [Emacs-diffs] scratch/outline 7ecd5ee 05/15: lisp/outline.el (outline-show-entry): rename from `show-entry', Oleh Krehel, 2015/01/28
- [Emacs-diffs] scratch/outline f898942 10/15: lisp/outline.el (outline-hide-leaves): Rename from `hide-leaves'., Oleh Krehel, 2015/01/28
- [Emacs-diffs] scratch/outline 18467f2 11/15: lisp/outline.el (outline-show-subtree): Rename from `show-subtree'., Oleh Krehel, 2015/01/28
- [Emacs-diffs] scratch/outline ef1267e 13/15: lisp/outline.el (outline-hide-other): Rename from `hide-other'., Oleh Krehel, 2015/01/28
- [Emacs-diffs] scratch/outline a34cf43 12/15: lisp/outline.el (outline-hide-sublevels): Rename from `hide-sublevels'., Oleh Krehel, 2015/01/28
- [Emacs-diffs] scratch/outline 4ad2134 14/15: lisp/outline.el (outline-show-children): Rename from `show-children'., Oleh Krehel, 2015/01/28
- [Emacs-diffs] scratch/outline 8fc5ca4 15/15: lisp/outline.el (outline-show-branches): Rename from `show-branches'., Oleh Krehel, 2015/01/28