Skip to content

Commit

Permalink
emacs-24.4 with emacs-24.4-mac-5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
railwaycat committed Nov 5, 2014
1 parent 2e5ff49 commit 4e4490b
Show file tree
Hide file tree
Showing 14 changed files with 786 additions and 105 deletions.
31 changes: 31 additions & 0 deletions NEWS-mac
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
* emacs-24.4-mac-5.1 (2014-11-03)

** Fixed bugs

*** "C-_" on JIS keyboard is recognized as "_".
Reported by OHKAWA Yuichi.

*** Checking "Reduce translucency" in the Accessibility pane in the
System Preferences on OS X 10.10 makes fringe areas translucent.
Reported by Nicholas Riley.

** Improvements

*** Blend-and-blur of fringe background on OS X 10.10 is no longer
hard-coded. It can be customized per face by specifying a special
name `alpha:ALPHA' as a value of the background stipple attribute.
For example,
(set-face-stipple 'fringe "alpha:50%")
or
defaults write org.gnu.Emacs Emacs.fringe.attributeStipple alpha:.5
will (mostly) recover the appearance of the previous release.
Note: Setting stipple for the default face may not work as you expect.
This is the same limitation as the standard stipple feature on X11.
Also, blend-and-blur is temporarily turned off during animations.

*** New experimental functions `mac-osa-language-list' and
`mac-osa-script'. The latter is like `do-applescript', but can
execute JavaScript as well as AppleScript on OS X 10.10.


* emacs-24.4-mac-5.0 (2014-10-21)
Based on Emacs 24.4.
http://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00725.html

** Fixed bugs

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ https://gist.github.com/3498096

## Changelog ##

#### 11/04/2014 ####
* Emacs 24.4 with emacs-24.4-mac-5.1

#### 10/21/2014 ####
* Emacs 24.4 with emacs-24.4-mac-5.0

Expand Down
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -29706,7 +29706,7 @@ $as_echo "before 10.5" >&6; }
libs_quartz_core=
fi
# Whether to use the Cocoa framework.
libs_macgui="-framework Carbon -framework WebKit -framework Quartz $libs_quartz_core -framework IOKit -framework Cocoa"
libs_macgui="-framework Carbon -framework WebKit -framework Quartz $libs_quartz_core -framework IOKit -framework OSAKit -framework Cocoa"
headerpad_extra=BD0
elif test "$HAVE_NS" = "yes"; then
libs_macgui="-framework AppKit"
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -4929,7 +4929,7 @@ fail;
libs_quartz_core=
fi
# Whether to use the Cocoa framework.
libs_macgui="-framework Carbon -framework WebKit -framework Quartz $libs_quartz_core -framework IOKit -framework Cocoa"
libs_macgui="-framework Carbon -framework WebKit -framework Quartz $libs_quartz_core -framework IOKit -framework OSAKit -framework Cocoa"
headerpad_extra=BD0
elif test "$HAVE_NS" = "yes"; then
libs_macgui="-framework AppKit"
Expand Down
21 changes: 21 additions & 0 deletions doc/emacs/macport.texi
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,27 @@ images or reload files automatically.
interpreted as those in the sRGB color space. This may give a
different look from other ports of GNU Emacs.

On OS X 10.10, one can blend and blur background colors of the
focused frame with the contents behind it. This can be customized per
face by a special background stipple name @samp{alpha:@var{alpha}},
where @var{alpha} is a decimal representation of a floating-point
number from 0.0 (maximum transparency) to 1.0 (completely opaque).
The number @var{alpha} may be followed by @samp{%} and in this case it
should be from 0.0 to 100.0. It can be specified as a ``File'' value
for the Stipple attribute in @pxref{Face Customization}.
Alternatively, it may be specified via either Lisp evaluation:

@example
(set-face-stipple 'fringe "alpha:50%")
@end example

@noindent
or X resources emulation by the Preferences system:

@smallexample
defaults write org.gnu.Emacs Emacs.fringe.attributeStipple alpha:.5
@end smallexample

@node Mac Fullscreen
@section Fullscreen support on the Mac Port
@cindex fullscreen support (Mac port)
Expand Down
4 changes: 4 additions & 0 deletions src/image.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,9 @@ x_create_bitmap_from_data (struct frame *f, char *bits, unsigned int width, unsi
dpyinfo->bitmaps[id - 1].depth = 1;
#endif

#ifndef HAVE_MACGUI
dpyinfo->bitmaps[id - 1].file = NULL;
#endif
dpyinfo->bitmaps[id - 1].height = height;
dpyinfo->bitmaps[id - 1].width = width;
dpyinfo->bitmaps[id - 1].refcount = 1;
Expand Down Expand Up @@ -506,11 +508,13 @@ free_bitmap_record (Display_Info *dpyinfo, Bitmap_Record *bm)
ns_release_object (bm->img);
#endif

#ifndef HAVE_MACGUI
if (bm->file)
{
xfree (bm->file);
bm->file = NULL;
}
#endif
}

/* Remove reference to bitmap with id number ID. */
Expand Down
64 changes: 64 additions & 0 deletions src/mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -2569,6 +2569,61 @@ ASCII-only string literal. */)
}


Lisp_Object Qapp_name;
Lisp_Object QCinfo, QCversion, QCsub_type, QCmanufacturer, QCfeatures;

DEFUN ("mac-osa-language-list", Fmac_osa_language_list, Smac_osa_language_list, 0, 1, 0,
doc: /* Return a list of available OSA languages.
If optional arg LONG-FORMAT-P is nil, then each element is a language
name string. Otherwise, each element is a cons of a language name and
a property list of information about the language.
The first element of the result corresponds the default language. */)
(Lisp_Object long_format_p)
{
return mac_osa_language_list (long_format_p);
}

DEFUN ("mac-osa-script", Fmac_osa_script, Smac_osa_script, 1, MANY, 0,
doc: /* Execute SCRIPT as an OSA script.
SCRIPT is a string specifying an OSA script source code.
Optional 2nd arg LANGUAGE is a string specifying the OSA language in
which SCRIPT is written. It should be an element of the result of
`(mac-osa-language-list)'. A value of nil means the default language.
Optional 3rd arg SCRIPT-TYPE is currently unused, but reserved for
future use. Don't specify any values other than nil for now.
If optional 4th arg VALUE-FORM is nil, then the return value is a
string in the LANGUAGE source form. If it is t, then the return value
is a Lisp representation of the resulting Apple event descriptor (see
`mac-ae-set-reply-parameter'). The other values are reserved for
future use.
Optional 5th arg HANDLER-CALL specifies a handler to be called in the
context of SCRIPT. If it is a string, then a handler named
HANDLER-CALL is called together with the arguments ARGS. Each element
of ARGS should be a Lisp representation of an Apple event descriptor
(see `mac-ae-set-reply-parameter').
HANDLER-CALL can be a Lisp representation of an Apple event, packing a
handler name and arguments as follows:
(let ((script "on show_message(user_message)
tell application \\"Finder\\" to display dialog user_message
end show_message")
(ae (mac-create-apple-event "ascr" "psbr" '("null"))))
(mac-ae-set-parameter ae "snam" '("utf8" . "show_message"))
(mac-ae-set-parameter ae "----" '("list" ("utf8" . "Message from my app.")))
(mac-osa-script script nil nil nil ae))
usage: (mac-osa-script SCRIPT &optional LANGUAGE SCRIPT-TYPE VALUE-FORM HANDLER-CALL &rest ARGS) */)
(ptrdiff_t nargs, Lisp_Object *args)
{
return mac_osa_script (nargs, args);
}

DEFUN ("mac-coerce-ae-data", Fmac_coerce_ae_data, Smac_coerce_ae_data, 3, 3, 0,
doc: /* Coerce Apple event data SRC-DATA of type SRC-TYPE to DST-TYPE.
Each type should be a string of length 4 or the symbol
Expand Down Expand Up @@ -3774,6 +3829,13 @@ syms_of_mac (void)

DEFSYM (Qmac_file_alias_p, "mac-file-alias-p");

DEFSYM (Qapp_name, "app-name");
DEFSYM (QCinfo, ":info");
DEFSYM (QCversion, ":version");
DEFSYM (QCsub_type, ":sub-type");
DEFSYM (QCmanufacturer, ":manufacturer");
DEFSYM (QCfeatures, ":features");

DEFSYM (Qxml, "xml");
DEFSYM (Qxml1, "xml1");
DEFSYM (Qbinary1, "binary1");
Expand All @@ -3794,6 +3856,8 @@ syms_of_mac (void)
DEFSYM (ae_attr_table[i].symbol, ae_attr_table[i].name);
}

defsubr (&Smac_osa_language_list);
defsubr (&Smac_osa_script);
defsubr (&Smac_coerce_ae_data);
defsubr (&Smac_get_preference);
defsubr (&Smac_convert_property_list);
Expand Down
18 changes: 18 additions & 0 deletions src/macappkit.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ along with GNU Emacs Mac port. If not, see <http://www.gnu.org/licenses/>. */
#import <QuartzCore/QuartzCore.h>
#endif
#import <IOKit/graphics/IOGraphicsLib.h>
#import <OSAKit/OSAKit.h>
#define Z (current_buffer->text->z)

#ifndef NSFoundationVersionNumber10_8_3
Expand Down Expand Up @@ -132,6 +133,12 @@ typedef id instancetype;
#endif
@end

#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
@interface NSObject (Emacs)
- (void)didRunTemporarilyWithInvocation:(NSInvocation *)invocation;
@end
#endif

@interface NSScreen (Emacs)
+ (NSScreen *)screenContainingPoint:(NSPoint)aPoint;
+ (NSScreen *)closestScreenForRect:(NSRect)aRect;
Expand Down Expand Up @@ -644,6 +651,9 @@ typedef id instancetype;
- (long)doAppleScript:(Lisp_Object)script result:(Lisp_Object *)result;
@end

@interface EmacsOSAScript : OSAScript
@end

@interface DOMSVGRect : DOMObject
- (float)x;
- (float)y;
Expand Down Expand Up @@ -1043,6 +1053,14 @@ enum {
@end
#endif

#if MAC_OS_X_VERSION_MAX_ALLOWED < 101000
@interface NSWorkspace (AvailableOn101000AndLater)
- (BOOL)accessibilityDisplayShouldIncreaseContrast;
- (BOOL)accessibilityDisplayShouldDifferentiateWithoutColor;
- (BOOL)accessibilityDisplayShouldReduceTransparency;
@end
#endif

#if MAC_OS_X_VERSION_MAX_ALLOWED < 1090
@interface NSView (AvailableOn1090AndLater)
- (void)setLayerUsesCoreImageFilters:(BOOL)usesFilters;
Expand Down
Loading

0 comments on commit 4e4490b

Please sign in to comment.