summaryrefslogtreecommitdiff
path: root/lisp/startup.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/startup.el')
-rw-r--r--lisp/startup.el37
1 files changed, 23 insertions, 14 deletions
diff --git a/lisp/startup.el b/lisp/startup.el
index b7b4c156f02..44eea7745f7 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -53,7 +53,8 @@ or directory when no target file is specified."
(const :tag "Startup screen" nil)
(directory :tag "Directory" :value "~/")
(file :tag "File" :value "~/.emacs")
- (function :tag "Function")
+ (const :tag "Notes buffer" remember-notes)
+ (function :tag "Function")
(const :tag "Lisp scratch buffer" t))
:version "24.4"
:group 'initialization)
@@ -413,14 +414,20 @@ Warning Warning!!! Pure space overflow !!!Warning Warning
:type 'directory
:initialize 'custom-initialize-delay)
-(defconst package-subdirectory-regexp
- "\\([^.].*?\\)-\\([0-9]+\\(?:[.][0-9]+\\|\\(?:pre\\|beta\\|alpha\\)[0-9]+\\)*\\)"
- "Regular expression matching the name of a package subdirectory.
-The first subexpression is the package name.
-The second subexpression is the version string.
-
-The regexp should not contain a starting \"\\`\" or a trailing
- \"\\'\"; those are added automatically by callers.")
+(defvar package--builtin-versions
+ ;; Mostly populated by loaddefs.el via autoload-builtin-package-versions.
+ (purecopy `((emacs . ,(version-to-list emacs-version))))
+ "Alist giving the version of each versioned builtin package.
+I.e. each element of the list is of the form (NAME . VERSION) where
+NAME is the package name as a symbol, and VERSION is its version
+as a list.")
+
+(defun package--description-file (dir)
+ (concat (let ((subdir (file-name-nondirectory
+ (directory-file-name dir))))
+ (if (string-match "\\([^.].*?\\)-\\([0-9]+\\(?:[.][0-9]+\\|\\(?:pre\\|beta\\|alpha\\)[0-9]+\\)*\\)" subdir)
+ (match-string 1 subdir) subdir))
+ "-pkg.el"))
(defun normal-top-level-add-subdirs-to-load-path ()
"Add all subdirectories of `default-directory' to `load-path'.
@@ -715,7 +722,7 @@ opening the first frame (e.g. open a connection to an X server).")
default-frame-alist))
(t
(push argi rest)))))
- (nreverse rest)))
+ (nconc (nreverse rest) args)))
(declare-function x-get-resource "frame.c"
(attribute class &optional component subclass))
@@ -1194,10 +1201,12 @@ the `--debug-init' option to view a complete error backtrace."
(dolist (dir dirs)
(when (file-directory-p dir)
(dolist (subdir (directory-files dir))
- (when (and (file-directory-p (expand-file-name subdir dir))
- (string-match
- (concat "\\`" package-subdirectory-regexp "\\'")
- subdir))
+ (when (let ((subdir (expand-file-name subdir dir)))
+ (and (file-directory-p subdir)
+ (file-exists-p
+ (expand-file-name
+ (package--description-file subdir)
+ subdir))))
(throw 'package-dir-found t)))))))
(package-initialize))