diff options
Diffstat (limited to 'lisp/nxml')
-rw-r--r-- | lisp/nxml/nxml-mode.el | 37 | ||||
-rw-r--r-- | lisp/nxml/rng-loc.el | 2 | ||||
-rw-r--r-- | lisp/nxml/rng-maint.el | 5 |
3 files changed, 22 insertions, 22 deletions
diff --git a/lisp/nxml/nxml-mode.el b/lisp/nxml/nxml-mode.el index f17f5843b80..6f80912dd58 100644 --- a/lisp/nxml/nxml-mode.el +++ b/lisp/nxml/nxml-mode.el @@ -56,8 +56,9 @@ The glyph is displayed in face `nxml-glyph'." :group 'nxml :type 'boolean) -(defcustom nxml-sexp-element-flag nil +(defcustom nxml-sexp-element-flag t "Non-nil means sexp commands treat an element as a single expression." + :version "27.1" ; nil -> t :group 'nxml :type 'boolean) @@ -471,11 +472,10 @@ The Emacs commands that normally operate on balanced expressions will operate on XML markup items. Thus \\[forward-sexp] will move forward across one markup item; \\[backward-sexp] will move backward across one markup item; \\[kill-sexp] will kill the following markup item; -\\[mark-sexp] will mark the following markup item. By default, each -tag each treated as a single markup item; to make the complete element -be treated as a single markup item, set the variable -`nxml-sexp-element-flag' to t. For more details, see the function -`nxml-forward-balanced-item'. +\\[mark-sexp] will mark the following markup item. By default, the +complete element is treated as a single markup item; to make each tag be +treated as a separate markup item, set the variable `nxml-sexp-element-flag' +to nil. For more details, see the function `nxml-forward-balanced-item'. \\[nxml-backward-up-element] and \\[nxml-down-element] move up and down the element structure. @@ -493,7 +493,7 @@ Many aspects this mode can be customized using ;; FIXME: Use the fact that we're parsing the document already ;; rather than using regex-based filtering. (setq-local tildify-foreach-region-function - (apply-partially #'tildify-foreach-ignore-environments + (apply-partially 'tildify-foreach-ignore-environments '(("<! *--" . "-- *>") ("<" . ">")))) (setq-local mode-line-process '((nxml-degraded "/degraded"))) ;; We'll determine the fill prefix ourselves @@ -1510,17 +1510,18 @@ With ARG, do it that many times. Negative arg -N means move backward across N balanced expressions. This is the equivalent of `forward-sexp' for XML. -An element contains as items strings with no markup, tags, processing -instructions, comments, CDATA sections, entity references and -characters references. However, if the variable -`nxml-sexp-element-flag' is non-nil, then an element is treated as a -single markup item. A start-tag contains an element name followed by -one or more attributes. An end-tag contains just an element name. -An attribute value literals contains strings with no markup, entity -references and character references. A processing instruction -consists of a target and a content string. A comment or a CDATA -section contains a single string. An entity reference contains a -single name. A character reference contains a character number." +An element is by default treated as a single markup item. +However, if the variable `nxml-sexp-element-flag' is nil, then an +element contains as items strings with no markup, tags, +processing instructions, comments, CDATA sections, entity +references and character references. A start-tag contains an +element name followed by one or more attributes. An end-tag +contains just an element name. An attribute value literals +contains strings with no markup, entity references and character +references. A processing instruction consists of a target and a +content string. A comment or a CDATA section contains a single +string. An entity reference contains a single name. A character +reference contains a character number." (interactive "^p") (or arg (setq arg 1)) (cond ((> arg 0) diff --git a/lisp/nxml/rng-loc.el b/lisp/nxml/rng-loc.el index 89b58e38b06..db4f6e48284 100644 --- a/lisp/nxml/rng-loc.el +++ b/lisp/nxml/rng-loc.el @@ -407,7 +407,7 @@ or nil." "Return a list of rules for the schema locating file FILE." (setq file (expand-file-name file)) (let ((cached (assoc file rng-schema-locating-file-alist)) - (mtime (nth 5 (file-attributes file))) + (mtime (file-attribute-modification-time (file-attributes file))) parsed) (cond ((not mtime) (when cached diff --git a/lisp/nxml/rng-maint.el b/lisp/nxml/rng-maint.el index da4567daf6e..18e38989929 100644 --- a/lisp/nxml/rng-maint.el +++ b/lisp/nxml/rng-maint.el @@ -226,11 +226,10 @@ (defun rng-time-function (function &rest args) (let* ((start (current-time)) - (val (apply function args)) - (end (current-time))) + (val (apply function args))) (message "%s ran in %g seconds" function - (float-time (time-subtract end start))) + (float-time (time-subtract nil start))) val)) (defun rng-time-tokenize-buffer () |