Fix bookmark list in home buffer, clean shortcuts

bookmark-all-names returns a list of names, but
spacemacs-buffer//insert-file-list expect a list of filenames.

Shortcut definitions seems to be a mix of two approaches/commits.
Removed the unused bits.
This commit is contained in:
Fandag 2015-06-03 08:45:54 +02:00 committed by syl20bnr
parent 24d03a9346
commit 073c58ca2d
1 changed files with 7 additions and 6 deletions

View File

@ -463,10 +463,8 @@ HPADDING is the horizontal spacing betwee the content line and the frame border.
:follow-link "\C-m")
(insert "\n\n"))
(defun spacemacs-buffer//insert-file-list (list-display-name list shortcut-char)
(defun spacemacs-buffer//insert-file-list (list-display-name list)
(when (car list)
(spacemacs//insert--shortcut "r" "Recent Files:")
(spacemacs//insert--shortcut "p" "Projects:")
(insert list-display-name)
(mapc (lambda (el)
(insert "\n ")
@ -492,15 +490,18 @@ HPADDING is the horizontal spacing betwee the content line and the frame border.
(cond
((eq el 'recents)
(recentf-mode)
(when (spacemacs-buffer//insert-file-list "Recent Files:" (recentf-elements 5) "r")
(when (spacemacs-buffer//insert-file-list "Recent Files:" (recentf-elements 5))
(spacemacs//insert--shortcut "r" "Recent Files:")
(insert list-separator)))
((eq el 'bookmarks)
(helm-mode)
(when (spacemacs-buffer//insert-file-list "Bookmarks:" (bookmark-all-names) "b")
(when (spacemacs-buffer//insert-file-list "Bookmarks:" (mapcar 'bookmark-get-filename (bookmark-all-names)))
(spacemacs//insert--shortcut "m" "Bookmarks:")
(insert list-separator)))
((eq el 'projects)
(projectile-mode)
(when (spacemacs-buffer//insert-file-list "Projects:" (projectile-relevant-known-projects) "p")
(when (spacemacs-buffer//insert-file-list "Projects:" (projectile-relevant-known-projects))
(spacemacs//insert--shortcut "p" "Projects:")
(insert list-separator))))) dotspacemacs-startup-lists))))
(defun spacemacs-buffer/goto-link-line ()