saneman wrote:
In my .emacs file I have made:
;; Directories
(setq mylisp "~/work/mylisp/")
;; Line numbers
(load-file mylisp cons "setnu.el")
(global-set-key "\C-cl" 'setnu-mode)
But this gives an error. How do I "cons" the variable mylisp with a
filename?
(cons mylisp "setnu.el")
however, that gives you a cons, which (i think) is not what you want. in
order to concatenate strings, you need concat:
(concat mylisp "setnu.el")
but even that is probably not the best way to do what you want. it's
probably better to add "~/work/mylisp" to your load path:
(setq load-path (cons "~/work/mylisp" load-path))
then you can load the file without explicitly naming its path:
(load-file "setnu.el")