From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Felix Mueller Newsgroups: gmane.emacs.devel Subject: NS do not set INFOPATH Date: Sun, 03 May 2009 15:47:52 +0200 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1241358524 3653 80.91.229.12 (3 May 2009 13:48:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 3 May 2009 13:48:44 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 03 15:48:36 2009 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.50) id 1M0c3X-0008PY-WF for ged-emacs-devel@m.gmane.org; Sun, 03 May 2009 15:48:36 +0200 Original-Received: from localhost ([127.0.0.1]:59720 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M0c3X-000274-CO for ged-emacs-devel@m.gmane.org; Sun, 03 May 2009 09:48:35 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M0c3O-00025d-CW for emacs-devel@gnu.org; Sun, 03 May 2009 09:48:26 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M0c3I-00023M-KB for emacs-devel@gnu.org; Sun, 03 May 2009 09:48:25 -0400 Original-Received: from [199.232.76.173] (port=43090 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M0c3I-00023I-6V for emacs-devel@gnu.org; Sun, 03 May 2009 09:48:20 -0400 Original-Received: from www151.your-server.de ([213.133.104.151]:42648) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M0c3H-00082u-IZ for emacs-devel@gnu.org; Sun, 03 May 2009 09:48:20 -0400 Original-Received: from [213.73.65.44] (helo=ereboook.local) by www151.your-server.de with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69) (envelope-from ) id 1M0c2x-0007oD-9y for emacs-devel@gnu.org; Sun, 03 May 2009 15:48:01 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (darwin) X-Authenticated-Sender: felix@enqueue.eu X-Virus-Scanned: Clear (Could not determin AV Version) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:110616 Archived-At: --=-=-= Hi, I would find it less intrusive, if Emacs.app did not set INFOPATH upon start up if it was not set before. This would enable users to make changes to Info-default-directory-list in their initialization files. I am attaching changes that imitate w32's behavior in this regard, albeit adding the info directory in the bundle at the beginning of the list. It might be prudent to change that if Emacs is built non self-contained. I am a complete newcomer to changing Emacs "internals", so please forgive me if this does not conform to emacs dev conventions. If you decide against changing the behavior, I would find it helpful if you included a hint in the documentation. This would spare users from searching through Emacs.app/Contents/Info.plist, ~/.MacOSX/environment.plist or launchd.conf files, looking for the definition of the INFOPATH. Thanks! -- Felix Mueller --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=nsterm.m.diff Index: src/nsterm.m =================================================================== RCS file: /sources/emacs/emacs/src/nsterm.m,v retrieving revision 1.69 diff -u -r1.69 nsterm.m --- src/nsterm.m 30 Apr 2009 16:52:19 -0000 1.69 +++ src/nsterm.m 3 May 2009 13:34:08 -0000 @@ -409,14 +409,6 @@ setenv ("EMACSDOC", [resourcePath UTF8String], 1); } } - - if (!getenv ("INFOPATH")) - { - resourcePath = [resourceDir stringByAppendingPathComponent: @"info"]; - if ([fileManager fileExistsAtPath: resourcePath isDirectory: &isDir]) - if (isDir) - setenv ("INFOPATH", [resourcePath UTF8String], 1); - } } --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=ns-win.el.diff Index: lisp/term/ns-win.el =================================================================== RCS file: /sources/emacs/emacs/lisp/term/ns-win.el,v retrieving revision 1.42 diff -u -r1.42 ns-win.el --- lisp/term/ns-win.el 30 Apr 2009 18:01:40 -0000 1.42 +++ lisp/term/ns-win.el 3 May 2009 13:34:58 -0000 @@ -1266,6 +1266,20 @@ (add-to-list 'frame-creation-function-alist '(ns . x-create-frame-with-faces)) (add-to-list 'window-system-initialization-alist '(ns . ns-initialize-window-system)) +;;; Setup Info-default-directory-list to include the info directory +;;; near where Emacs executable was installed. We used to set INFOPATH, +;;; but when this is set Info-default-directory-list is ignored. We +;;; also cannot rely upon what is set in paths.el because they assume +;;; that configuration during build time is correct for runtime. +;;; (copied from w32-fns.el) +(defun ns-init-info () + (let* ((instdir (file-name-directory invocation-directory)) + (dir1 (expand-file-name "../Resources/info/" instdir))) + (if (file-exists-p dir1) + (setq Info-default-directory-list + (append (list dir1) Info-default-directory-list))))) + +(add-hook 'before-init-hook 'ns-init-info) (provide 'ns-win) --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=macos.texi.diff Index: doc/emacs/macos.texi =================================================================== RCS file: /sources/emacs/emacs/doc/emacs/macos.texi,v retrieving revision 1.12 diff -u -r1.12 macos.texi --- doc/emacs/macos.texi 2 May 2009 19:28:41 -0000 1.12 +++ doc/emacs/macos.texi 3 May 2009 13:32:33 -0000 @@ -31,7 +31,6 @@ * Mac / GNUstep Customization:: Customizations under GNUstep or Mac OS. * Mac / GNUstep Events:: How window system events are handled. * GNUstep Support:: Details on status of GNUstep support -* @end menu @node Mac / GNUstep Basics, Mac / GNUstep Customization, , Mac OS / GNUstep @@ -99,6 +98,10 @@ of setting PATH is recommended on Mac OS X 10.5 and later, using the @file{/etc/paths} files and the @file{/etc/paths.d} directory. +If the INFOPATH environment variable is not set during startup, Emacs +sets it to @file{@var{invocation-directory}../Resources/info}, thus +rendering any changes to @code{Info-default-directory-list} in the +initialization files ineffective. @node Mac / GNUstep Customization, Mac / GNUstep Events, Mac / GNUstep Basics, Mac OS / GNUstep @section Mac / GNUstep Customization --=-=-=--