]> code.delx.au - gnu-emacs/commitdiff
eval-and-compile inlined functions so they will
authorDavid Ponce <david@dponce.com>
Wed, 15 Jun 2005 13:49:02 +0000 (13:49 +0000)
committerDavid Ponce <david@dponce.com>
Wed, 15 Jun 2005 13:49:02 +0000 (13:49 +0000)
be available at run-time too.
(tree-widget-value-create): Fix last change.

lisp/tree-widget.el

index ea49a6f07f3e62b700882e0d86eabe6f0755e169..448879cea5a71481ec5cedbbeb4c968937868a76 100644 (file)
@@ -174,7 +174,7 @@ no-handle    an invisible handle
 \f
 ;;; Image support
 ;;
-(eval-when-compile ;; GNU Emacs/XEmacs compatibility stuff
+(eval-and-compile ;; GNU Emacs/XEmacs compatibility stuff
   (cond
    ;; XEmacs
    ((featurep 'xemacs)
@@ -616,9 +616,17 @@ IGNORE other arguments."
          (widget-glyph-enable widget-image-enable)           ; XEmacs
          (node (tree-widget-node tree))
          (flags (widget-get tree :tree-widget--guide-flags))
-         (indent (and (bolp) (widget-get tree :indent)))
+         (indent (widget-get tree :indent))
          children buttons)
-    (and (null flags) indent (insert-char ?\  indent))
+    (and indent
+         (null flags)
+         (save-restriction
+           (widen)
+           (or (bolp)
+               (and (eq (char-before) ?<)
+                    (save-excursion
+                      (backward-char) (bolp)))))
+         (insert-char ?\  indent))
     (if (widget-get tree :open)
 ;;;; Unfolded node.
         (let ((args     (widget-get tree :args))