Skip to content

Commit

Permalink
Fix bookmark list in home buffer, clean shortcuts
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Fandag authored and syl20bnr committed Jun 12, 2015
1 parent 24d03a9 commit 073c58c
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions core/core-spacemacs-buffer.el
Original file line number Diff line number Diff line change
Expand Up @@ -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 ")
Expand All @@ -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 ()
Expand Down

0 comments on commit 073c58c

Please sign in to comment.