Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

load-path and load a lisp file

Tags:

emacs

after setting a path for my lisp files in emacs in the .emacs file, like this

(add-to-list 'load-path "~/elisp/")

logically I should also use a load command for a specific file I guess what is that command

I tried

(load-file-name "google-c-style") with the .el added also for the file, what should be the right way to do this

however no success.

like image 588
Umut Tabak Avatar asked Feb 27 '26 04:02

Umut Tabak


2 Answers

If the .el has a line like (provide 'google-c-style), then all you need in your .emacs is:

(require 'google-c-style)
like image 108
Trey Jackson Avatar answered Mar 02 '26 13:03

Trey Jackson


It's just (load), not (load-file-name).

like image 29
geekosaur Avatar answered Mar 02 '26 13:03

geekosaur



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!