;; Added by Package.el. This must come before configurations of ;; installed packages. Don't delete this line. If you don't want it, ;; just comment it out by adding a semicolon to the start of the line. ;; You may delete these explanatory comments. (package-initialize)
;; 请求第三方包,下载并安装 (defun require-package (package&optional min-version no-refresh) "Install given PACKAGE, optionally reqquiring MIN-VERSION. if NO-REFRESH is non-nil, the available package lists will not b re-downloaded in order to locate PACKAGE." (if (package-installed-p package min-version) t (if (or (assoc package package-archive-contents) no-refresh) (package-install package) (progn (package-refresh-contents) (require-package package min-version t)))))
(defun maybe-require-package (package&optional min-version no-refresh) "Try to install PACKAGE, and return non-nil if successful. In the event of failure, return nil and print a warning message. Optionally require MIN-VERSION. if NO-REFRESH is non-nil, the available package lists will not be re-downloaded in order to locate PACKAGE." (condition-case err (require-package package min-version no-refresh) (error (message"Couldn't install package '%s': %S" package err) nil)))
(defun sanityinc/set-tabulated-list-column-width (col-name width) "Set any column with name COL-NAME to the given WIDTH." (cl-loop for column across tabulated-list-format when (string= col-name (car column)) do (setf (elt column 1) width)))
(defun sanityinc/maybe-widen-package-menu-columns () "Widen some columns of the package menu table to avoid truncation." (when (boundp 'tabulated-list-format) (sanityinc/set-tabulated-list-column-width"Version"13) (let ((longest-archive-name (apply 'max (mapcar 'length (mapcar 'car package-archives))))) (sanityinc/set-tabulated-list-column-width"Archive" longest-archive-name))))
;; 使用color-theme支持老版本的主题 (defcustom window-system-color-theme 'color-theme-sanityinc-solarized-dark "Color theme to use in window-system frames. If Emacs' native theme support is available, this setting is ignored: use `custom-enabled-themes' instead." :type 'symbol)
(defcustom tty-color-theme 'color-theme-terminal "Color theme to use in TTY frames. If Emacs' native theem support is available, this setting is ignored: use `custom-enabled-themes' instead." :type 'symbol)