summaryrefslogtreecommitdiff
path: root/lisp/nxml/nxml-outln.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/nxml/nxml-outln.el')
-rw-r--r--lisp/nxml/nxml-outln.el28
1 files changed, 14 insertions, 14 deletions
diff --git a/lisp/nxml/nxml-outln.el b/lisp/nxml/nxml-outln.el
index 962160cb435..289816a1bba 100644
--- a/lisp/nxml/nxml-outln.el
+++ b/lisp/nxml/nxml-outln.el
@@ -1,4 +1,4 @@
-;;; nxml-outln.el --- outline support for nXML mode
+;;; nxml-outln.el --- outline support for nXML mode -*- lexical-binding:t -*-
;; Copyright (C) 2004, 2007-2016 Free Software Foundation, Inc.
@@ -248,6 +248,16 @@ customize which elements are recognized as sections and headings."
(interactive)
(nxml-transform-subtree-outline '((hide-children . t))))
+;; These variables are dynamically bound. They are use to pass information to
+;; nxml-section-tag-transform-outline-state.
+
+(defvar nxml-outline-state-transform-exceptions nil)
+(defvar nxml-target-section-pos nil)
+(defvar nxml-depth-in-target-section nil)
+(defvar nxml-outline-state-transform-alist nil)
+
+(defvar nxml-outline-display-section-tag-function nil)
+
(defun nxml-hide-other ()
"Hide text content other than that directly in the section containing point.
Hide headings other than those of ancestors of that section and their
@@ -275,14 +285,6 @@ customize which elements are recognized as sections and headings."
(nxml-transform-buffer-outline '((nil . hide-children)
(t . hide-children)))))
-;; These variables are dynamically bound. They are use to pass information to
-;; nxml-section-tag-transform-outline-state.
-
-(defvar nxml-outline-state-transform-exceptions nil)
-(defvar nxml-target-section-pos nil)
-(defvar nxml-depth-in-target-section nil)
-(defvar nxml-outline-state-transform-alist nil)
-
(defun nxml-transform-buffer-outline (alist)
(let ((nxml-target-section-pos nil)
(nxml-depth-in-target-section 0)
@@ -350,7 +352,7 @@ customize which elements are recognized as sections and headings."
(defun nxml-section-tag-transform-outline-state (startp
section-start-pos
&optional
- heading-start-pos)
+ _heading-start-pos)
(if (not startp)
(setq nxml-depth-in-target-section
(and nxml-depth-in-target-section
@@ -427,8 +429,6 @@ customize which elements are recognized as sections and headings."
(nxml-outline-error
(nxml-report-outline-error "Cannot display outline: %s" err)))))
-(defvar nxml-outline-display-section-tag-function nil)
-
(defun nxml-outline-display-rest (outline-state start-tag-indent tag-qnames)
"Display up to and including the end of the current element.
OUTLINE-STATE can be nil, t, hide-children. START-TAG-INDENT is the
@@ -789,7 +789,7 @@ no new overlay will be created."
(defun nxml-end-of-heading ()
"Move from the start of the content of the heading to the end.
Do not move past the end of the line."
- (let ((pos (condition-case err
+ (let ((pos (condition-case nil
(and (nxml-scan-element-forward (point) t)
xmltok-start)
(nxml-scan-error nil))))
@@ -888,7 +888,7 @@ Point is at the end of the tag. `xmltok-start' is the start."
(nxml-ensure-scan-up-to-date)
(let ((pos (nxml-inside-start (point))))
(when pos
- (goto-char (1- pos))
+ (goto-char pos)
t))))
((progn
(xmltok-forward)