update packages and add valign
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
;;; dashboard.el --- A startup screen extracted from Spacemacs -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (c) 2016-2025 emacs-dashboard maintainers
|
||||
;; Copyright (c) 2016-2026 emacs-dashboard maintainers
|
||||
;;
|
||||
;; Author : Rakan Al-Hneiti <rakan.alhneiti@gmail.com>
|
||||
;; Maintainer : Shen, Jen-Chieh <jcs090218@gmail.com>
|
||||
;; Ricardo Arredondo <ricardo.richo@gmail.com>
|
||||
;; URL : https://github.com/emacs-dashboard/emacs-dashboard
|
||||
;; URL : https://github.com/emacs-dashboard/dashboard
|
||||
;;
|
||||
;; This file is not part of GNU Emacs.
|
||||
;;
|
||||
;;; License: GPLv3
|
||||
;;
|
||||
;; Created: October 05, 2016
|
||||
;; Package-Version: 20250708.57
|
||||
;; Package-Revision: 8c2cf0cfde4f
|
||||
;; Package-Version: 20260402.436
|
||||
;; Package-Revision: 176d641a5554
|
||||
;; Keywords: startup, screen, tools, dashboard
|
||||
;; Package-Requires: ((emacs "27.1"))
|
||||
|
||||
@@ -32,8 +32,9 @@
|
||||
;;
|
||||
;;; Externals
|
||||
|
||||
(declare-function bookmark-get-filename "ext:bookmark.el")
|
||||
(declare-function bookmark-all-names "ext:bookmark.el")
|
||||
(declare-function bookmark-get-filename "ext:bookmark.el")
|
||||
(declare-function bookmark-delete "ext:bookmark.el")
|
||||
(declare-function dashboard-ls--dirs "ext:dashboard-ls.el")
|
||||
(declare-function dashboard-ls--files "ext:dashboard-ls.el")
|
||||
(declare-function page-break-lines-mode "ext:page-break-lines.el")
|
||||
@@ -50,7 +51,6 @@
|
||||
"Extensible startup screen."
|
||||
:group 'applications)
|
||||
|
||||
;; Custom splash screen
|
||||
(defvar dashboard-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map (kbd "C-p") #'dashboard-previous-line)
|
||||
@@ -273,32 +273,46 @@ example:
|
||||
(defun dashboard-cycle-section-forward (&optional section)
|
||||
"Cycle forward through the entries in SECTION.
|
||||
If SECTION is nil, cycle in the current section."
|
||||
(let ((target-section (or section (dashboard--current-section))))
|
||||
(if target-section
|
||||
(condition-case nil
|
||||
(progn
|
||||
(widget-forward 1)
|
||||
(unless (eq target-section (dashboard--current-section))
|
||||
(dashboard--goto-section target-section)))
|
||||
(widget-forward 1))
|
||||
(widget-forward 1))))
|
||||
(if section
|
||||
(lambda () "Cycle section forwards"
|
||||
(interactive)
|
||||
(widget-forward 1)
|
||||
(unless (eq section (ignore-errors (dashboard--current-section)))
|
||||
(dashboard--goto-section section)))
|
||||
(lambda ()
|
||||
(interactive) "Cycle current-section forwards"
|
||||
(if (widget-at (point))
|
||||
(let ((current-section (ignore-errors (dashboard--current-section))))
|
||||
(widget-forward 1)
|
||||
(unless (eq current-section (ignore-errors (dashboard--current-section)))
|
||||
(dashboard--goto-section current-section)))
|
||||
(widget-forward 1)))))
|
||||
|
||||
(defun dashboard-cycle-section-backward (&optional section)
|
||||
"Cycle backward through the entries in SECTION.
|
||||
If SECTION is nil, cycle in the current section."
|
||||
(let ((target-section (or section (dashboard--current-section))))
|
||||
(if target-section
|
||||
(condition-case nil
|
||||
(progn
|
||||
(widget-backward 1)
|
||||
(unless (eq target-section (dashboard--current-section))
|
||||
(progn
|
||||
(dashboard--goto-section target-section)
|
||||
(while (eq target-section (dashboard--current-section))
|
||||
(widget-forward 1))
|
||||
(widget-backward 1))))
|
||||
(widget-backward 1))
|
||||
(widget-backward 1))))
|
||||
(if section
|
||||
(lambda () "Cycle section backwards"
|
||||
(interactive)
|
||||
(widget-backward 1)
|
||||
(unless (eq section (ignore-errors (dashboard--current-section)))
|
||||
(dashboard--goto-section section)
|
||||
(while (eq section (ignore-errors (dashboard--current-section)))
|
||||
(widget-forward 1))
|
||||
(widget-backward 1)))
|
||||
(lambda () "Cycle current-section backwards"
|
||||
(interactive)
|
||||
(if (widget-at (point))
|
||||
(let ((current-section (ignore-errors (dashboard--current-section))))
|
||||
(widget-backward 1)
|
||||
(unless (eq current-section (ignore-errors (dashboard--current-section)))
|
||||
(dashboard--goto-section current-section)
|
||||
(unless (eq section (ignore-errors (dashboard--current-section)))
|
||||
(dashboard--goto-section section)
|
||||
(while (eq section (ignore-errors (dashboard--current-section)))
|
||||
(widget-forward 1))
|
||||
(widget-backward 1))))
|
||||
(widget-backward 1)))))
|
||||
|
||||
(defun dashboard-section-1 ()
|
||||
"Navigate to section 1." (interactive) (dashboard--goto-section-by-index 1))
|
||||
@@ -429,7 +443,9 @@ Optional argument ARGS adviced function arguments."
|
||||
|
||||
(defun dashboard-remove-item-bookmarks ()
|
||||
"Remove a bookmarks from `bookmark-alist'."
|
||||
(interactive)) ; TODO: ..
|
||||
(interactive)
|
||||
(let ((bookmark-name (get-text-property (point) 'dashboard-bookmarks-name)))
|
||||
(bookmark-delete bookmark-name)))
|
||||
|
||||
(defun dashboard-remove-item-agenda ()
|
||||
"Remove an agenda from `org-agenda-files'."
|
||||
@@ -526,7 +542,9 @@ See `dashboard-item-generators' for all items available."
|
||||
"Insert the list of widgets into the buffer, FORCE-REFRESH is optional."
|
||||
(interactive)
|
||||
(let ((inhibit-redisplay t)
|
||||
(recentf-is-on (recentf-enabled-p))
|
||||
(recentf-is-on (or (recentf-enabled-p)
|
||||
(and (assq 'recents dashboard-items)
|
||||
(dashboard-mute-apply (recentf-mode 1)))))
|
||||
(origial-recentf-list recentf-list)
|
||||
(dashboard-num-recents (or (cdr (assoc 'recents dashboard-items)) 0)))
|
||||
(when recentf-is-on
|
||||
|
||||
Reference in New Issue
Block a user