Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Lazy load it's module #359

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
* Make shortcut function name respect to shortcut id (#348)
* Add capability to custom align agenda widget (#350)
* Correct straight.el package count (#354)
* Lazy load modules specify in dashboard buffer (#359)

## 1.7.0
> Released Feb 21, 2020
Expand Down
10 changes: 4 additions & 6 deletions dashboard.el
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,10 @@
:syntax-table nil
:abbrev-table nil
(buffer-disable-undo)
(whitespace-mode -1)
(linum-mode -1)
(when (>= emacs-major-version 26)
(display-line-numbers-mode -1))
(when (require 'page-break-lines nil t)
(page-break-lines-mode 1))
(when (featurep 'whitespace) (whitespace-mode -1))
(when (featurep 'linum) (linum-mode -1))
(when (featurep 'display-line-numbers) (display-line-numbers-mode -1))
(when (featurep 'page-break-lines) (page-break-lines-mode 1))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even calling (minor-mode -1) will load it's module. Avoid doing that can increase startup time.

(setq-local revert-buffer-function #'dashboard-refresh-buffer)
(setq inhibit-startup-screen t
buffer-read-only t
Expand Down