Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emacs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
emacs
emacs
Commits
2d69b99e
Commit
2d69b99e
authored
Aug 28, 2013
by
Stefan Monnier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* lisp/emacs-lisp/package.el (package-activate-1): Don't add unnecessarily
to load-path.
parent
274919fd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
4 deletions
+16
-4
lisp/ChangeLog
lisp/ChangeLog
+5
-0
lisp/emacs-lisp/package.el
lisp/emacs-lisp/package.el
+11
-4
No files found.
lisp/ChangeLog
View file @
2d69b99e
2013-08-28 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/package.el (package-activate-1): Don't add unnecessarily
to load-path.
2013-08-28 Juri Linkov <juri@jurta.org>
* isearch.el (isearch-reread-key-sequence-naturally): Use non-nil
...
...
lisp/emacs-lisp/package.el
View file @
2d69b99e
...
...
@@ -457,19 +457,26 @@ Return the max version (as a string) if the package is held at a lower version."
(
defun
package-activate-1
(
pkg-desc
)
(
let*
((
name
(
package-desc-name
pkg-desc
))
(
pkg-dir
(
package-desc-dir
pkg-desc
)))
(
pkg-dir
(
package-desc-dir
pkg-desc
))
(
pkg-dir-dir
(
file-name-as-directory
pkg-dir
)))
(
unless
pkg-dir
(
error
"Internal error: unable to find directory for `%s'"
(
package-desc-full-name
pkg-desc
)))
;; Add to load path, add autoloads, and activate the package.
(
let
((
old-lp
load-path
))
(
load
(
expand-file-name
(
format
"%s-autoloads"
name
)
pkg-dir
)
nil
t
)
(
when
(
and
(
eq
old-lp
load-path
)
(
not
(
or
(
member
pkg-dir
load-path
)
(
member
pkg-dir-dir
load-path
))))
;; Old packages don't add themselves to the `load-path', so we have to
;; do it ourselves.
(
push
pkg-dir
load-path
)))
;; Add info node.
(
when
(
file-exists-p
(
expand-file-name
"dir"
pkg-dir
))
;; FIXME: not the friendliest, but simple.
(
require
'info
)
(
info-initialize
)
(
push
pkg-dir
Info-directory-list
))
;; Add to load path, add autoloads, and activate the package.
(
push
pkg-dir
load-path
)
(
load
(
expand-file-name
(
format
"%s-autoloads"
name
)
pkg-dir
)
nil
t
)
(
push
name
package-activated-list
)
;; Don't return nil.
t
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment