From: Katsumi Yamaoka <yamaoka@jpl.org>
Cc: Andi Hechtbauer <anti@spin.de>, ding@gnus.org
Subject: Re: Wrong type argument: stringp when Generating cus-load.el
Date: Fri, 08 Nov 2002 07:13:20 +0900 [thread overview]
Message-ID: <yotlk7jpm3jz.fsf@jpl.org> (raw)
In-Reply-To: <87adklurpa.fsf@raven.i.defaultvalue.org>
[-- Attachment #1: Type: text/plain, Size: 225 bytes --]
Hi,
>>>>> In <87adklurpa.fsf@raven.i.defaultvalue.org>
>>>>> Rob Browning <rlb@defaultvalue.org> wrote:
> I'll need to see what RMS changed back and fix that here too.
Here are the past record of cus-dep.el in Emacs CVS.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 400 bytes --]
--- cus-dep.el-20020917 2001-07-16 12:22:58 +0000
+++ cus-dep.el-20020918 2002-09-18 16:01:21 +0000
@@ -86,6 +86,8 @@
(let ((members (get symbol 'custom-group))
item where found)
(when members
+ ;; So x and no-x builds won't differ.
+ (setq members (sort (copy-sequence members) 'string<))
(while members
(setq item (car (car members))
members (cdr members)
[-- Attachment #3: Type: text/plain, Size: 1 bytes --]
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: Type: text/x-patch, Size: 739 bytes --]
--- cus-dep.el-20020918 2002-09-18 16:01:21 +0000
+++ cus-dep.el-20020919 2002-09-19 18:57:48 +0000
@@ -87,7 +87,17 @@
item where found)
(when members
;; So x and no-x builds won't differ.
- (setq members (sort (copy-sequence members) 'string<))
+ (setq members
+ (sort (copy-sequence members)
+ (lambda (x y)
+ (cond ((and (stringp x) (stringp y))
+ (string< x y))
+ ;; Put all non-strings before strings.
+ ((stringp y) t)
+ ((stringp x) nil)
+ ;; For two non-strings,
+ ;; use the order they appear in MEMBERS.
+ (t (member y (member x members)))))))
(while members
(setq item (car (car members))
members (cdr members)
[-- Attachment #5: Type: text/plain, Size: 1 bytes --]
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #6: Type: text/x-patch, Size: 3865 bytes --]
--- cus-dep.el-20020919 2002-09-19 18:57:48 +0000
+++ cus-dep.el-current 2002-11-07 01:05:06 +0000
@@ -34,30 +34,38 @@
(defun custom-make-dependencies ()
"Batch function to extract custom dependencies from .el files.
Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS"
- (let ((enable-local-eval nil)
- (all-subdirs command-line-args-left)
- (start-directory default-directory))
- (get-buffer-create " cus-dep temp")
- (set-buffer " cus-dep temp")
- (while all-subdirs
- (message "Directory %s" (car all-subdirs))
- (let ((files (directory-files (car all-subdirs) nil "\\`[^=].*\\.el\\'"))
- (default-directory default-directory)
- file
+ (let ((enable-local-eval nil))
+ (set-buffer (get-buffer-create " cus-dep temp"))
+ (dolist (subdir command-line-args-left)
+ (message "Directory %s" subdir)
+ (let ((files (directory-files subdir nil "\\`[^=].*\\.el\\'"))
+ (default-directory (expand-file-name subdir))
+ (preloaded (concat "\\`"
+ (regexp-opt (mapcar
+ (lambda (f)
+ (file-name-sans-extension
+ (file-name-nondirectory f)))
+ preloaded-file-list) t)
+ "\\.el\\'"))
is-autoloaded)
- (cd (car all-subdirs))
- (while files
- (setq file (car files)
- files (cdr files))
- (when (file-exists-p file)
+ (dolist (file files)
+ (when (and (file-exists-p file)
+ ;; Ignore files that are preloaded.
+ (not (string-match preloaded file)))
(erase-buffer)
(insert-file-contents file)
(goto-char (point-min))
(string-match "\\`\\(.*\\)\\.el\\'" file)
(let ((name (file-name-nondirectory (match-string 1 file))))
+ (if (save-excursion
+ (re-search-forward
+ (concat "(provide[ \t\n]+\\('\\|(quote[ \t\n]\\)[ \t\n]*"
+ (regexp-quote name) "[ \t\n)]")
+ nil t))
+ (setq name (intern name)))
(condition-case nil
- (while (re-search-forward "^(defcustom\\|^(defface\\|^(defgroup"
- nil t)
+ (while (re-search-forward
+ "^(def\\(custom\\|face\\|group\\)" nil t)
(setq is-autoloaded nil)
(beginning-of-line)
(save-excursion
@@ -66,15 +74,14 @@
(setq is-autoloaded t)))
(let ((expr (read (current-buffer))))
(condition-case nil
- (progn
+ (let ((custom-dont-initialize t))
(eval expr)
(put (nth 1 expr) 'custom-autoloaded is-autoloaded)
(put (nth 1 expr) 'custom-where name))
(error nil))))
- (error nil)))))
- (setq all-subdirs (cdr all-subdirs)))))
+ (error nil))))))))
(message "Generating cus-load.el...")
- (find-file "cus-load.el")
+ (set-buffer (find-file-noselect "cus-load.el"))
(erase-buffer)
(insert "\
;;; cus-load.el --- automatically extracted custom dependencies
@@ -89,15 +96,7 @@
;; So x and no-x builds won't differ.
(setq members
(sort (copy-sequence members)
- (lambda (x y)
- (cond ((and (stringp x) (stringp y))
- (string< x y))
- ;; Put all non-strings before strings.
- ((stringp y) t)
- ((stringp x) nil)
- ;; For two non-strings,
- ;; use the order they appear in MEMBERS.
- (t (member y (member x members)))))))
+ (lambda (x y) (string< (car x) (car y)))))
(while members
(setq item (car (car members))
members (cdr members)
@@ -114,7 +113,7 @@
(insert "))\n"))))))
(insert "\
;;; These are for handling :version. We need to have a minimum of
-;;; information so `custom-changed-variables' could do its job.
+;;; information so `customize-changed-options' could do its job.
;;; For both groups and variables we have to set `custom-version'.
;;; For variables we also set the `standard-value' and for groups
;;; `group-documentation' (which is shown in the customize buffer), so
[-- Attachment #7: Type: text/plain, Size: 38 bytes --]
--
Katsumi Yamaoka <yamaoka@jpl.org>
next prev parent reply other threads:[~2002-11-07 22:13 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-07 2:13 Andi Hechtbauer
2002-11-07 4:18 ` Katsumi Yamaoka
2002-11-07 8:14 ` Manoj Srivastava
2002-11-07 9:07 ` Katsumi Yamaoka
2002-11-07 11:59 ` Andi Hechtbauer
2002-11-07 12:14 ` Katsumi Yamaoka
2002-11-07 12:52 ` Andi Hechtbauer
2002-11-07 14:46 ` Katsumi Yamaoka
2002-11-07 18:48 ` Andi Hechtbauer
2002-11-07 19:04 ` Rob Browning
2002-11-07 22:13 ` Katsumi Yamaoka [this message]
2002-11-07 22:24 ` Katsumi Yamaoka
2002-11-08 2:02 ` Manoj Srivastava
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yotlk7jpm3jz.fsf@jpl.org \
--to=yamaoka@jpl.org \
--cc=anti@spin.de \
--cc=ding@gnus.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 NNTP newsgroup(s).