Skip to content

Instantly share code, notes, and snippets.


mjwall/ Secret

Last active Oct 4, 2016
What would you like to do?
Installing Emacs 24.3 on MacOSX Lion
# be sure to install xcode 4.3 and command line tools first
git clone git://
git co -b emacs-24.3-local emacs-24.2
#apply patch for fullscreen, yes!
curl | patch -p1
# could also manually apply the srbg patch from homebrew
if build.include? "srgb"
inreplace "src/nsterm.m",
"*col = [NSColor colorWithCalibratedRed: r green: g blue: b alpha: 1.0];",
"*col = [NSColor colorWithDeviceRed: r green: g blue: b alpha: 1.0];"
# see
env CC=gcc ./configure --host=x86_64-apple-darwin --build=i686-apple-darwin --with-ns
make bootstrap
make install
sudo mv /usr/bin/emacs /usr/bin/emacs-23.4 #or whatever version
sudo mv /usr/bin/emacsclient /usr/bin/emacsclient-23.4 #or whatever version
sudo mv /usr/bin/ctags /usr/bin/ctags.orig
sudo mv /usr/bin/etags /usr/bin/etags.orig
sudo mv /Applications/ /Applications/ #or whatever version
cd nextstep/
sudo cp -R /Applications/.
cd /Applications/
cd bin
for f in *; do sudo ln -s /Application/$f /usr/bin/$f; done
now make /usr/bin/emacs the following, so it operates properly
if [ $(id -u) = "0" ]; then
sudo $EMACS_PATH $*
sudo chown -R root:staff /Applications/
sudo chown root:wheel /usr/bin/emacs
sudo chmod 755 /usr/bin/emacs
- Get configs from
- Code
# raw patch below incase it goes away
diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el
index b8baaa0..9d25ff3 100644
--- a/lisp/term/ns-win.el
+++ b/lisp/term/ns-win.el
@@ -940,6 +940,10 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.")
(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))
+(declare-function ns-toggle-fullscreen-internal "nsfns.m" ())
+(defun ns-toggle-fullscreen ()
+ (interactive)
+ (ns-toggle-fullscreen-internal))
(provide 'ns-win)
diff --git a/src/nsfns.m b/src/nsfns.m
index fac61d2..9dbbc47 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -2580,6 +2580,21 @@ Value is t if tooltip was open, nil otherwise. */)
return Qt;
+DEFUN ("ns-toggle-fullscreen-internal", Fns_toggle_fullscreen_internal, Sns_toggle_fullscreen_internal,
+ 0, 0, 0,
+ doc: /* Toggle fulscreen mode */)
+ struct frame *f = SELECTED_FRAME();
+ EmacsWindow *window = ns_get_window(f);
+ [window toggleFullScreen:nil];
+ return Qnil;
/* ==========================================================================
@@ -2736,6 +2751,8 @@ be used as the image of the icon representing the frame. */);
defsubr (&Sx_show_tip);
defsubr (&Sx_hide_tip);
+ defsubr (&Sns_toggle_fullscreen_internal);
/* used only in fontset.c */
check_window_system_func = check_ns;

This comment has been minimized.

Copy link

@too too commented Aug 15, 2016

line 32
for f in *; do sudo ln -s /Application/$f /usr/bin/$f; done

Application should be Applications?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.