diff options
author | Vibhav Pant <vibhavp@gmail.com> | 2020-08-21 14:04:35 +0530 |
---|---|---|
committer | Vibhav Pant <vibhavp@gmail.com> | 2020-08-21 14:04:35 +0530 |
commit | f0f8d7b82492e741950c363a03b886965c91b1b0 (patch) | |
tree | 19b716830b1ebabc0d7d75949c4e6800c0f104ad /lisp/speedbar.el | |
parent | 9e64a087c4d167e7ec1c4e22bea3e6af53b563de (diff) | |
parent | c818c29771d3cb51875643b2f6c894073e429dd2 (diff) | |
download | emacs-feature/native-comp-macos-fixes.tar.gz |
Merge branch 'feature/native-comp' into feature/native-comp-macos-fixesfeature/native-comp-macos-fixes
Diffstat (limited to 'lisp/speedbar.el')
-rw-r--r-- | lisp/speedbar.el | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/lisp/speedbar.el b/lisp/speedbar.el index e9c15b71ce6..5b98eb36bb9 100644 --- a/lisp/speedbar.el +++ b/lisp/speedbar.el @@ -3240,19 +3240,21 @@ With universal argument ARG, flush cached data." "Expand the line under the cursor and all descendants. Optional argument ARG indicates that any cache should be flushed." (interactive "P") - (speedbar-expand-line arg) - ;; Now, inside the area expanded here, expand all subnodes of - ;; the same descendant type. - (save-excursion - (speedbar-next 1) ;; Move into the list. - (let ((err nil)) - (while (not err) - (condition-case nil - (progn - (speedbar-expand-line-descendants arg) - (speedbar-restricted-next 1)) - (error (setq err t)))))) - ) + (save-restriction + (narrow-to-region (line-beginning-position) + (line-beginning-position 2)) + (speedbar-expand-line arg) + ;; Now, inside the area expanded here, expand all subnodes of + ;; the same descendant type. + (save-excursion + (speedbar-next 1) ;; Move into the list. + (let ((err nil)) + (while (not err) + (condition-case nil + (progn + (speedbar-expand-line-descendants arg) + (speedbar-restricted-next 1)) + (error (setq err t)))))))) (defun speedbar-contract-line-descendants () "Expand the line under the cursor and all descendants." |