unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Lachlan Deck <lachlan.deck@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: dolist require help
Date: Fri, 30 Sep 2011 09:33:19 +1000	[thread overview]
Message-ID: <4DAB2718-69FB-4675-84A8-062125CB9715@gmail.com> (raw)
In-Reply-To: <3516DA17-6376-4850-988D-12917DDDE518@gmail.com>

Answering my own question:

use intern instead of make-symbol.

On 30/09/2011, at 9:10 AM, Lachlan Deck wrote:

> Hi there,
> 
> I'm trying to auto-require some custom provided stuff -- a list of files containing various settings -- and can't quite make it work.
> 
> Any ideas what I'm doing wrong?
> 
> (defvar my-el-dir (file-name-directory load-file-name))
> (defvar my-custom-dir (concat my-el-dir "custom/"))
> (add-to-list 'load-path my-custom-dir)
> 
> (require 'my-package-autoloads)
> (require 'my-el-get-autoloads)
> 
> ;; this doesn't work (strack trace below)                                                                                                                                                                                                          
> (dolist (setting-file (file-expand-wildcards (concat my-custom-dir "*-settings.el")))
>  (progn (print (concat "---> loading " (file-name-sans-extension (file-name-nondirectory setting-file)))))
>  (require (make-symbol (file-name-sans-extension (file-name-nondirectory setting-file)))))
> 
> ;; this does work
> (require 'my-ecb-settings)
> <..>
> 
> Lachlan Deck
> lachlan.deck@gmail.com
> 
> 
> Debugger entered--Lisp error: (error "Required feature `my-ecb-settings' was not provided")
>  require(my-ecb-settings)
>  (while --cl-dolist-temp-- (setq setting-file (car --cl-dolist-temp--)) (progn (print (concat "---> loading " (file-name-sans-extension (file-name-nondirectory setting-file))))) (require (make-symbol ($
>  (let ((--cl-dolist-temp-- (file-expand-wildcards (concat my-custom-dir "*-settings.el"))) setting-file) (while --cl-dolist-temp-- (setq setting-file (car --cl-dolist-temp--)) (progn (print (concat "--$
>  (catch (quote --cl-block-nil--) (let ((--cl-dolist-temp-- (file-expand-wildcards (concat my-custom-dir "*-settings.el"))) setting-file) (while --cl-dolist-temp-- (setq setting-file (car --cl-dolist-te$
>  (cl-block-wrapper (catch (quote --cl-block-nil--) (let ((--cl-dolist-temp-- (file-expand-wildcards (concat my-custom-dir "*-settings.el"))) setting-file) (while --cl-dolist-temp-- (setq setting-file ($
>  (block nil (let ((--cl-dolist-temp-- (file-expand-wildcards (concat my-custom-dir "*-settings.el"))) setting-file) (while --cl-dolist-temp-- (setq setting-file (car --cl-dolist-temp--)) (progn (print $
>  (dolist (setting-file (file-expand-wildcards (concat my-custom-dir "*-settings.el"))) (progn (print (concat "---> loading " (file-name-sans-extension (file-name-nondirectory setting-file))))) (require$
>  eval-buffer(#<buffer  *load*<3>> nil "/Users/ldeck/.emacs.d/ldeck/my.el" nil t)  ; Reading at buffer position 562
>  load-with-code-conversion("/Users/ldeck/.emacs.d/ldeck/my.el" "/Users/ldeck/.emacs.d/ldeck/my.el" nil nil)
>  load("my.el")
> <...>




      reply	other threads:[~2011-09-29 23:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-29 23:10 dolist require help Lachlan Deck
2011-09-29 23:33 ` Lachlan Deck [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DAB2718-69FB-4675-84A8-062125CB9715@gmail.com \
    --to=lachlan.deck@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).