Skip to content

Commit

Permalink
Emacs 24.2 with emacs-24.2-mac-3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
railwaycat committed Oct 30, 2012
1 parent e608118 commit 8317e24
Show file tree
Hide file tree
Showing 11 changed files with 257 additions and 93 deletions.
9 changes: 7 additions & 2 deletions README
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
0. current

+ update 10/30/2012: Emacs 24.2 with emacs-24.2-mac-3.3
+ update 08/27/2012: Emacs 24.2 with emacs-24.2-mac-3.2
+ update 07/28/2012: Emacs 24.1 with emacs-24.1-mac-3.1
+ macfont patch for 10.8
Expand Down Expand Up @@ -59,12 +60,16 @@
Without clone and compile, just download from

https://github.com/downloads/railwaycat/emacs-mac-port/Emacs.zip

If you prefer the official Emacs icon (the "E" and a pan), please download this

https://github.com/downloads/railwaycat/emacs-mac-port/Emacs-official-icon.zip

* Tested on Mac OS X 10.8.1 *
* Tested on Mac OS X 10.8.2/10.7.5*

Plan B.
Build a self-contained Emacs.app with build-emacs.app.sh
* Tested on Mac OS X 10.8.1 *
* Tested on Mac OS X 10.8.2/10.7.5 *

Plan C.
If you are using Homebrew, copy "emacs-mac.rb" to your brew's
Expand Down
6 changes: 3 additions & 3 deletions aclocal.m4
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated automatically by aclocal 1.12.3 -*- Autoconf -*-
# generated automatically by aclocal 1.12.4 -*- Autoconf -*-

# Copyright (C) 1996-2012 Free Software Foundation, Inc.

Expand Down Expand Up @@ -34,7 +34,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.12'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
m4_if([$1], [1.12.3], [],
m4_if([$1], [1.12.4], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])

Expand All @@ -50,7 +50,7 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.12.3])dnl
[AM_AUTOMAKE_VERSION([1.12.4])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
Expand Down
2 changes: 1 addition & 1 deletion lib/Makefile.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Makefile.in generated by automake 1.12.3 from Makefile.am.
# Makefile.in generated by automake 1.12.4 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2012 Free Software Foundation, Inc.
Expand Down
30 changes: 23 additions & 7 deletions lisp/term/mac-win.el
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,10 @@ Request data types in the order specified by `x-select-request-type'."
;;;; Apple events, Action events, and Services menu

(defvar mac-startup-options)
(declare-function mac-send-apple-event-internal "macselect.c"
(apple-event &optional send-mode))
(declare-function mac-start-animation "macfns.c"
(frame-or-window &rest properties))

;;; Event classes
(put 'core-event 'mac-apple-event-class "aevt") ; kCoreEventClass
Expand Down Expand Up @@ -1687,6 +1691,8 @@ See also `mac-dnd-known-types'."
(mac-dnd-drop-data event (selected-frame) window data type action))))


(defvar mac-popup-menu-add-contexual-menu)

(declare-function accelerate-menu "macmenu.c" (&optional frame) t)

(defun mac-menu-bar-open (&optional frame)
Expand All @@ -1697,6 +1703,12 @@ See also `mac-dnd-known-types'."
(accelerate-menu frame)
(tmm-menubar)))

(defun mac-mouse-buffer-menu (event)
"Like 'mouse-buffer-menu', but contextual menu is added if possible."
(interactive "e")
(let ((mac-popup-menu-add-contexual-menu t))
(mouse-buffer-menu event)))


;;; Mouse wheel smooth scroll

Expand Down Expand Up @@ -2040,9 +2052,6 @@ Return non-nil if the new state is enabled."


;;; Swipe events
(declare-function mac-start-animation "macfns.c"
(frame-or-window &rest properties))

(defun mac-previous-buffer (event)
"Like `previous-buffer', but operate on the window where EVENT occurred."
(interactive "e")
Expand Down Expand Up @@ -2286,10 +2295,14 @@ standard ones in `x-handle-args'."
(create-default-fontset)

(set-fontset-font t nil (font-spec :family "Apple Symbols") nil 'prepend)
(if (string-match "darwin[1-9][1-9]" system-configuration)
;; Built on Mac OS X 10.7 or later.
(set-fontset-font t nil (font-spec :family "Apple Color Emoji")
nil 'prepend))
(when (and (string-match "darwin\\([0-9]+\\)" system-configuration)
(>= (string-to-number (match-string 1 system-configuration)) 11))
;; Built on Mac OS X 10.7 or later.
(set-fontset-font t nil (font-spec :family "Apple Color Emoji")
nil 'prepend)
;; Regional Indicator Symbols
(set-char-table-range composition-function-table '(#x1F1E6 . #x1F1FF)
'(["[\x1F1E6-\x1F1FF]+" 0 font-shape-gstring])))
;; (set-fontset-font t nil (font-spec :family "LastResort") nil 'append)
(set-fontset-font t '(#x20000 . #x2FFFF)
'("HanaMinB" . "unicode-sip") nil 'append)
Expand Down Expand Up @@ -2375,6 +2388,9 @@ standard ones in `x-handle-args'."
(substitute-key-definition 'exit-splash-screen 'mac-exit-splash-screen
splash-screen-keymap)

(if (eq (lookup-key global-map [C-down-mouse-1]) 'mouse-buffer-menu)
(global-set-key [C-down-mouse-1] 'mac-mouse-buffer-menu))

(setq mac-initialized t))

(add-to-list 'handle-args-function-alist '(mac . mac-handle-args))
Expand Down
13 changes: 11 additions & 2 deletions src/mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -2343,11 +2343,16 @@ containing an unresolvable alias. */)

if (url)
{
CFBooleanRef is_alias_file;
CFBooleanRef is_alias_file = NULL, is_symbolic_link = NULL;

if (CFURLCopyResourcePropertyForKey (url, kCFURLIsAliasFileKey,
&is_alias_file, NULL)
&& CFBooleanGetValue (is_alias_file))
&& CFBooleanGetValue (is_alias_file)
/* kCFURLIsAliasFileKey returns true also for a symbolic
link. */
&& CFURLCopyResourcePropertyForKey (url, kCFURLIsSymbolicLinkKey,
&is_symbolic_link, NULL)
&& !CFBooleanGetValue (is_symbolic_link))
{
CFDataRef data;
Boolean stale_p;
Expand Down Expand Up @@ -2380,6 +2385,10 @@ containing an unresolvable alias. */)
if (!STRINGP (result))
result = Qt;
}
if (is_alias_file)
CFRelease (is_alias_file);
if (is_symbolic_link)
CFRelease (is_symbolic_link);
CFRelease (url);
}
}
Expand Down
Loading

0 comments on commit 8317e24

Please sign in to comment.