all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* NS do not set INFOPATH
@ 2009-05-03 13:47 Felix Mueller
  2009-05-16  5:08 ` Adrian Robert
  0 siblings, 1 reply; 6+ messages in thread
From: Felix Mueller @ 2009-05-03 13:47 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 874 bytes --]

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: nsterm.m.diff --]
[-- Type: text/x-patch, Size: 666 bytes --]

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);
-    }
 }
 
 

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: ns-win.el.diff --]
[-- Type: text/x-patch, Size: 1218 bytes --]

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)
 

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: macos.texi.diff --]
[-- Type: text/x-patch, Size: 1169 bytes --]

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-05-31  8:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-03 13:47 NS do not set INFOPATH Felix Mueller
2009-05-16  5:08 ` Adrian Robert
2009-05-16  8:15   ` Leo
2009-05-16 11:06   ` Felix Mueller
2009-05-16 23:26     ` Adrian Robert
2009-05-31  8:49       ` Felix Mueller

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.