Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] emacs config file

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Mads Laursen <smgl AT dossen.dk>
  • To: sm-discuss AT lists.ibiblio.org
  • Subject: Re: [SM-Discuss] emacs config file
  • Date: Sat, 14 Aug 2004 12:03:40 +0200

On 13/08/04 18.08, Pieter Lenaerts wrote:
> for some lisp plugins, the install instructions say to edit the ~/.emacs
> file
>
> emacs doesn't make this file until user changes his default settings.
>
> does anybody know
>
> 1. if it's 'necessary' to edit .emacs
> if yes: 2. if we want to edit system-wide in one config file, and which one
> that is
> or 3. if there is a default config-file (which I failed to find)
>
> option 3 is no good imo, as do people in #emacs think: it would force us to
> copy this default in every user directory, and edit this file in every user
> directory every time a plugin is installed that wants this.
>
> I'm pretty sure that we need option 2, but I'm totally lost in the
> emacs-directories.
> who can point me out?

Since we are talking about plugins, I think the proper way to add
their needed config is to add a seperate file to a suitable hook-dir
(similar to /etc/profile.d). The following code from my .emacs does it
for me:
(require 'cl)
(mapcar
'load
(remove-duplicates
(mapcar
(lambda (string)
(string-match "^\\(.*\\)\\.elc?$" string)
(match-string 1 string))
(directory-files "~/.emacs.d/" 'full "\\.elc?$"))
:test 'equal))

The reference to ~/.emacs.d/ should of cause be changed to something
system-wide, and the code should be placed in either a global settings
file or/and /etc/skel/.emacs whatever would work in the case of emacs.

/dossen

Attachment: pgpH5Gw7IASiH.pgp
Description: PGP signature




Archive powered by MHonArc 2.6.24.

Top of Page