From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.devel Subject: Re: Adding GnuTLS to the Windows port Date: Tue, 5 Oct 2010 06:00:10 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1286251264 4541 80.91.229.12 (5 Oct 2010 04:01:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 5 Oct 2010 04:01:04 +0000 (UTC) To: Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 05 06:01:03 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P2yi6-0007tw-1f for ged-emacs-devel@m.gmane.org; Tue, 05 Oct 2010 06:01:02 +0200 Original-Received: from localhost ([127.0.0.1]:51624 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P2yi4-00017u-NG for ged-emacs-devel@m.gmane.org; Tue, 05 Oct 2010 00:01:00 -0400 Original-Received: from [140.186.70.92] (port=42419 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P2yhx-00017T-Eh for emacs-devel@gnu.org; Tue, 05 Oct 2010 00:00:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P2yhv-0006fv-LN for emacs-devel@gnu.org; Tue, 05 Oct 2010 00:00:53 -0400 Original-Received: from mail-iw0-f169.google.com ([209.85.214.169]:48682) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P2yhv-0006fm-Fl for emacs-devel@gnu.org; Tue, 05 Oct 2010 00:00:51 -0400 Original-Received: by iwn36 with SMTP id 36so1287596iwn.0 for ; Mon, 04 Oct 2010 21:00:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=2j+2fF0hzkv4mttpCsv73GcSHk995HPsNI7D3OS6Vs0=; b=sIeC4VGIxiuXC3YnwUD/fDxVrzEkLnQ4bGosYQhG3YqEfdHaguhILDM5nsmzJF3kSE t1IV3BvIUTrKRncfkZKdVH1xUpyg+bWJYJbvr3dM/frndOb1pZ3NfzWV8gjalycOTkOl hexpGWMQEQs/LUHArHu2aANq5jwx9CRre+eN4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=lso23cU7fdKD1z4/J1uhcyY3HXrHaZGzzctd6OgCmgxQzW5H+XmyW0ax9PVWG1ewne mypzO3ShuQY7+vo1JVSDtw6URfLsvzgrYi+eBQEICAPt1bZBYFnI0NxutdNiJix+yLkl 6aoL5N0ERMaJKmNn+4c7bL/7n6bm6aprDK6pA= Original-Received: by 10.231.154.75 with SMTP id n11mr11397006ibw.40.1286251250870; Mon, 04 Oct 2010 21:00:50 -0700 (PDT) Original-Received: by 10.231.196.71 with HTTP; Mon, 4 Oct 2010 21:00:10 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:131351 Archived-At: On Sun, Oct 3, 2010 at 22:52, Juanma Barranquero wrote: > An additional question related to 3: it would make sense to rename > `image-library-alist' to `dynamic-library-alist' (with an obsolete > alias `image-library-alist'), move it to some other suitable .c file > (perhaps emacs.c?) and rewrite its doc to turn it into a more generic > facility. Patch attached. Though the description of dynamic-library-alist, currently at "(elisp)Image Formats" should be moved... where? =C2=A0 =C2=A0 Juanma 2010-10-05 Juanma Barranquero * emacs.c (Vdynamic_library_alist) (syms_of_emacs) : Move from image.c and rename. Doc fix. * lisp.h (Vdynamic_library_alist): Declare extern. * image.c (Vimage_library_alist) (syms_of_image) : Move to emacs.c and rename. (lookup_image_type): Use Vdynamic_library_alist. (Finit_image_library): Doc fix. * image.el (image-library-alist): Declare as obsolete alias. (image-type-available-p): Use `dynamic-library-alist'. * term/w32-win.el (dynamic-library-alist): Use instead of `image-library-alist'. * display.texi (Image Formats): Describe `dynamic-library-alist'. * NEWS: Mention `dynamic-library-alist'. * INSTALL: Refer to `dynamic-library-alist'. =3D=3D=3D modified file 'doc/lispref/display.texi' --- doc/lispref/display.texi 2010-09-09 02:18:38 +0000 +++ doc/lispref/display.texi 2010-10-05 02:58:35 +0000 @@ -4056,7 +4056,7 @@ Emacs can display a number of different image formats; some of them are supported only if particular support libraries are installed on your machine. In some environments, Emacs can load image -libraries on demand; if so, the variable @code{image-library-alist} +libraries on demand; if so, the variable @code{dynamic-library-alist} can be used to modify the set of known names for these dynamic libraries (though it is not possible to add new image formats). @@ -4082,21 +4082,25 @@ @code{image-type-available-p}. @end defvar -@defvar image-library-alist -This in an alist of image types vs external libraries needed to -display them. - -Each element is a list @code{(@var{image-type} @var{library}...)}, -where the car is a supported image format from @code{image-types}, and -the rest are strings giving alternate filenames for the corresponding -external libraries to load. - -Emacs tries to load the libraries in the order they appear on the -list; if none is loaded, the running session of Emacs won't support -the image type. @code{pbm} and @code{xbm} don't need to be listed; -they're always supported. - -This variable is ignored if the image libraries are statically linked +@defvar dynamic-library-alist +This is an alist of dynamic libraries vs external files implementing them. + +Each element is a list @code{(@var{library} @var{file}...)}, where the +car is a symbol representing a supported external library, and the +rest are strings giving alternate filenames for that library. + +Emacs tries to load the library from the files in the orden they +appear on the list; if none is loaded, the running session of Emacs +won't have access to that library. + +Note that image types @code{pbm} and @code{xbm} do not need entries in +this variable because they do not depend on external libraries and are +always available. + +Also note that this is not a generic facility for accessing external +libraries; only those already known by Emacs will be loaded. + +This variable is ignored if the given libraries are statically linked into Emacs. @end defvar =3D=3D=3D modified file 'etc/NEWS' --- etc/NEWS 2010-10-04 00:43:11 +0000 +++ etc/NEWS 2010-10-05 03:11:55 +0000 @@ -568,6 +568,10 @@ =0C * Lisp changes in Emacs 24.1 +** `image-library-alist' is renamed to `dynamic-library-alist'. +The variable is now used to load all kind of supported dynamic libraries, +not just image libraries. + ** New variable syntax-propertize-function to set syntax-table properties. Replaces font-lock-syntactic-keywords which are now obsolete. This allows syntax-table properties to be set independently from font-lock= : =3D=3D=3D modified file 'lisp/image.el' --- lisp/image.el 2010-09-09 02:25:12 +0000 +++ lisp/image.el 2010-10-05 02:59:37 +0000 @@ -330,14 +330,16 @@ type) -(defvar image-library-alist) +(define-obsolete-variable-alias + 'image-library-alist + 'dynamic-library-alist "24.1") ;;;###autoload (defun image-type-available-p (type) "Return non-nil if image type TYPE is available. Image types are symbols like `xbm' or `jpeg'." (and (fboundp 'init-image-library) - (init-image-library type image-library-alist))) + (init-image-library type dynamic-library-alist))) ;;;###autoload =3D=3D=3D modified file 'lisp/term/w32-win.el' --- lisp/term/w32-win.el 2010-01-13 08:35:10 +0000 +++ lisp/term/w32-win.el 2010-10-05 02:27:57 +0000 @@ -196,10 +196,10 @@ "Report an error when a suspend is attempted." (error "Suspending an Emacs running under W32 makes no sense")) -(defvar image-library-alist) +(defvar dynamic-library-alist) -;;; Set default known names for image libraries -(setq image-library-alist +;;; Set default known names for external libraries +(setq dynamic-library-alist '((xpm "libxpm.dll" "xpm4.dll" "libXpm-nox4.dll") (png "libpng12d.dll" "libpng12.dll" "libpng.dll" ;; these are libpng 1.2.8 from GTK+ =3D=3D=3D modified file 'nt/INSTALL' --- nt/INSTALL 2010-07-24 13:35:31 +0000 +++ nt/INSTALL 2010-10-05 02:50:31 +0000 @@ -258,7 +258,7 @@ library is not an error; the associated image format will simply be unavailable. Note that once Emacs has determined that a library can not be found, there's no way to force it to try again, other than - restarting. See the variable `image-library-alist' to configure the + restarting. See the variable `dynamic-library-alist' to configure the expected names of the libraries. Some image libraries have dependencies on one another, or on zlib. =3D=3D=3D modified file 'src/emacs.c' --- src/emacs.c 2010-10-03 13:59:56 +0000 +++ src/emacs.c 2010-10-05 02:37:56 +0000 @@ -187,6 +187,9 @@ Lisp code. */ Lisp_Object Vemacs_copyright, Vemacs_version; +/* Alist of external libraries and files implementing them. */ +Lisp_Object Vdynamic_library_alist; + /* If non-zero, emacs should not attempt to use a window-specific code, but instead should use the virtual terminal under which it was started.= */ int inhibit_window_system; @@ -2507,6 +2510,24 @@ doc: /* Version numbers of this version of Emacs. */); Vemacs_version =3D build_string (emacs_version); + DEFVAR_LISP ("dynamic-library-alist", &Vdynamic_library_alist, + doc: /* Alist of dynamic libraries vs external files implementing them= . +Each element is a list (LIBRARY FILE...), where the car is a symbol +representing a supported external library, and the rest are strings giving +alternate filenames for that library. + +Emacs tries to load the library from the files in the orden they appear on +the list; if none is loaded, the running session of Emacs won't have acces= s +to that library. + +Note that image types `pbm' and `xbm' do not need entries in this variable +because they do not depend on external libraries and are always available. + +Also note that this is not a generic facility for accessing external +libraries; only those already known by Emacs will be loaded. */); + Vdynamic_library_alist =3D Qnil; + Fput (intern_c_string ("dynamic-library-alist"), Qrisky_local_variable, = Qt); + /* Make sure IS_DAEMON starts up as false. */ daemon_pipe[1] =3D 0; } =3D=3D=3D modified file 'src/image.c' --- src/image.c 2010-10-01 12:25:21 +0000 +++ src/image.c 2010-10-05 02:24:30 +0000 @@ -567,10 +567,6 @@ Lisp_Object Vimage_types; -/* An alist of image types and libraries that implement the type. */ - -Lisp_Object Vimage_library_alist; - /* Cache for delayed-loading image types. */ static Lisp_Object Vimage_type_cache; @@ -645,7 +641,7 @@ struct image_type *type; /* We must initialize the image-type if it hasn't been already. */ - if (NILP (Finit_image_library (symbol, Vimage_library_alist))) + if (NILP (Finit_image_library (symbol, Vdynamic_library_alist))) return 0; /* unimplemented */ for (type =3D image_types; type; type =3D type->next) @@ -1923,10 +1919,11 @@ } /* Load a DLL implementing an image type. - The `image-library-alist' variable associates a symbol, - identifying an image type, to a list of possible filenames. + The argument LIBRARIES is usually the variable + `dynamic-library-alist', which associates a symbol, identifying + an external DLL library, to a list of possible filenames. The function returns NULL if no library could be loaded for - the given image type, or if the library was previously loaded; + the given symbol, or if the library was previously loaded; else the handle of the DLL. */ static HMODULE w32_delayed_load (Lisp_Object libraries, Lisp_Object type) @@ -8583,7 +8580,7 @@ Image types pbm and xbm are prebuilt; other types are loaded here. Libraries to load are specified in alist LIBRARIES (usually, the value -of `image-library-alist', which see). */) +of `dynamic-library-alist', which see). */) (Lisp_Object type, Lisp_Object libraries) { Lisp_Object tested; @@ -8659,20 +8656,6 @@ To check whether it is really supported, use `image-type-available-p'. */= ); Vimage_types =3D Qnil; - DEFVAR_LISP ("image-library-alist", &Vimage_library_alist, - doc: /* Alist of image types vs external libraries needed to display t= hem. - -Each element is a list (IMAGE-TYPE LIBRARY...), where the car is a symbol -representing a supported image type, and the rest are strings giving -alternate filenames for the corresponding external libraries. - -Emacs tries to load the libraries in the order they appear on the -list; if none is loaded, the running session of Emacs won't -support the image type. Types 'pbm and 'xbm don't need to be -listed; they are always supported. */); - Vimage_library_alist =3D Qnil; - Fput (intern_c_string ("image-library-alist"), Qrisky_local_variable, Qt= ); - DEFVAR_LISP ("max-image-size", &Vmax_image_size, doc: /* Maximum size of images. Emacs will not load an image into memory if its pixel width or =3D=3D=3D modified file 'src/lisp.h' --- src/lisp.h 2010-09-29 09:06:53 +0000 +++ src/lisp.h 2010-10-05 02:24:06 +0000 @@ -3300,6 +3300,7 @@ extern Lisp_Object Vinstallation_directory; extern Lisp_Object empty_unibyte_string, empty_multibyte_string; extern Lisp_Object Qfile_name_handler_alist; +extern Lisp_Object Vdynamic_library_alist; extern void (*fatal_error_signal_hook) (void); EXFUN (Fkill_emacs, 1) NO_RETURN; #if HAVE_SETLOCALE