From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/47594 Path: main.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: Wrong type argument: stringp when Generating cus-load.el Date: Fri, 08 Nov 2002 07:13:20 +0900 Organization: Emacsen advocacy group Sender: owner-ding@hpc.uh.edu Message-ID: References: <873cqdbxts.fsf@glaurung.green-gryphon.com> <87ptth35la.fsf@pod.hq.spin.de> <878z059pxv.fsf@pod.hq.spin.de> <87adklurpa.fsf@raven.i.defaultvalue.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1036707475 16800 80.91.224.249 (7 Nov 2002 22:17:55 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 7 Nov 2002 22:17:55 +0000 (UTC) Cc: Andi Hechtbauer , ding@gnus.org Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 189uyG-0004Mp-00 for ; Thu, 07 Nov 2002 23:17:53 +0100 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 189uus-0006RA-00; Thu, 07 Nov 2002 16:14:22 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Thu, 07 Nov 2002 16:15:08 -0600 (CST) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id QAA16323 for ; Thu, 7 Nov 2002 16:14:48 -0600 (CST) Original-Received: (qmail 9132 invoked by alias); 7 Nov 2002 22:13:44 -0000 Original-Received: (qmail 9119 invoked from network); 7 Nov 2002 22:13:39 -0000 Original-Received: from unknown (HELO mars.web-hosting.com) (207.228.244.150) by gnus.org with SMTP; 7 Nov 2002 22:13:39 -0000 Original-Received: from localhost ([207.228.245.242]) by mars.web-hosting.com (8.11.1/8.11.1) with ESMTP id gA7MDaI16840; Thu, 7 Nov 2002 17:13:36 -0500 (EST) Original-To: Rob Browning User-Agent: Gnus/5.090008 (Oort Gnus v0.08) XEmacs/21.4 (Military Intelligence, sparc-sun-solaris2.6) X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( Cancel-Lock: sha1:MBzA4imsx7E1WEqhvY1XnPU+zLs= X-Hashcash: 021107:rlb@defaultvalue.org:2fa30701230766e7 X-Hashcash: 021107:anti@spin.de:412081ca27e1ef5a X-Hashcash: 021107:ding@gnus.org:ea93ad30b9cbeb94 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:47594 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:47594 --=-=-= Hi, >>>>> In <87adklurpa.fsf@raven.i.defaultvalue.org> >>>>> Rob Browning 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. --=-=-= Content-Type: text/x-patch Content-Disposition: inline --- 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) --=-=-= Content-Disposition: inline --=-=-= Content-Type: text/x-patch Content-Disposition: inline --- 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) --=-=-= Content-Disposition: inline --=-=-= Content-Type: text/x-patch Content-Disposition: inline --- 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 --=-=-= Content-Disposition: inline -- Katsumi Yamaoka --=-=-=--