Fix typo, make annotations disappear when empties
This commit is contained in:
parent
ffae62c08b
commit
63401d1ae7
1 changed files with 7 additions and 6 deletions
|
@ -25,12 +25,12 @@
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(defvar oni-chsarp--projects (make-hash-table :test 'equal))
|
(defvar oni-csharp--projects (make-hash-table :test 'equal))
|
||||||
|
|
||||||
(defun oni-chsarp-collect-project-names ()
|
(defun oni-csharp-collect-project-names ()
|
||||||
"Go through the current buffer and collect all the project names."
|
"Go through the current buffer and collect all the project names."
|
||||||
(interactive)
|
(interactive)
|
||||||
(clrhash oni-chsarp--projects)
|
(clrhash oni-csharp--projects)
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(while (re-search-forward
|
(while (re-search-forward
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
:noerror)
|
:noerror)
|
||||||
(puthash (match-string-no-properties 3)
|
(puthash (match-string-no-properties 3)
|
||||||
(match-string-no-properties 2)
|
(match-string-no-properties 2)
|
||||||
oni-chsarp--projects))))
|
oni-csharp--projects))))
|
||||||
|
|
||||||
(defun oni-csharp-display-project-names ()
|
(defun oni-csharp-display-project-names ()
|
||||||
"Display the project names in the current buffer."
|
"Display the project names in the current buffer."
|
||||||
|
@ -70,9 +70,10 @@
|
||||||
:noerror)
|
:noerror)
|
||||||
(let ((current-overlay (make-overlay (line-beginning-position) (line-end-position))))
|
(let ((current-overlay (make-overlay (line-beginning-position) (line-end-position))))
|
||||||
(overlay-put current-overlay 'after-string
|
(overlay-put current-overlay 'after-string
|
||||||
(propertize (format " => %s" (gethash (match-string 1) oni-chsarp--projects))
|
(propertize (format " => %s" (gethash (match-string 1) oni-csharp--projects))
|
||||||
'face '(:foreground "#808080")))
|
'face '(:foreground "#808080")))
|
||||||
(overlay-put current-overlay 'oni-csharp--overlayp t)))))
|
(overlay-put current-overlay 'oni-csharp--overlayp t)
|
||||||
|
(overlay-put current-overlay 'evaporate t)))))
|
||||||
|
|
||||||
(provide 'oni-csharp)
|
(provide 'oni-csharp)
|
||||||
;;; oni-csharp.el ends here
|
;;; oni-csharp.el ends here
|
||||||
|
|
Loading…
Reference in a new issue