Function: mh-speed-add-folder
mh-speed-add-folder is an autoloaded and byte-compiled function
defined in mh-speed.el.gz.
Signature
(mh-speed-add-folder FOLDER)
Documentation
Add FOLDER since it is being created.
The function invalidates the latest ancestor that is present.
Source Code
;; Defined in /usr/src/emacs/lisp/mh-e/mh-speed.el.gz
;;;###mh-autoload
(defun mh-speed-add-folder (folder)
"Add FOLDER since it is being created.
The function invalidates the latest ancestor that is present."
(with-current-buffer speedbar-buffer
(let ((speedbar-update-flag nil)
(last-slash (mh-search-from-end ?/ folder))
(ancestor folder)
(ancestor-pos nil))
(cl-block while-loop
(while last-slash
(setq ancestor (substring ancestor 0 last-slash))
(setq ancestor-pos (gethash ancestor mh-speed-folder-map))
(when ancestor-pos
(cl-return-from while-loop))
(setq last-slash (mh-search-from-end ?/ ancestor))))
(unless ancestor-pos (setq ancestor nil))
(goto-char (or ancestor-pos (gethash nil mh-speed-folder-map)))
(speedbar-with-writable
(mh-speedbar-change-expand-button-char ?+)
(add-text-properties
(mh-line-beginning-position) (1+ (mh-line-beginning-position))
'(mh-children-p t)))
(when (get-text-property (mh-line-beginning-position) 'mh-expanded)
(mh-speed-toggle))
(setq mh-speed-refresh-flag t))))