diff options
Diffstat (limited to 'src/macfns.c')
-rw-r--r-- | src/macfns.c | 54 |
1 files changed, 45 insertions, 9 deletions
diff --git a/src/macfns.c b/src/macfns.c index 14261f67ad6..c74fd1089f0 100644 --- a/src/macfns.c +++ b/src/macfns.c @@ -1969,9 +1969,9 @@ mac_update_proxy_icon (f) { AEDesc desc; #ifdef MAC_OSX - FSRef fref; + FSRef fref, fref_proxy; #else - FSSpec fss; + FSSpec fss, fss_proxy; #endif Boolean changed; Lisp_Object encoded_file_name = ENCODE_FILE (file_name); @@ -1997,10 +1997,19 @@ mac_update_proxy_icon (f) { if (alias) { + /* (FS)ResolveAlias never sets `changed' to true if + `alias' is minimal. */ #ifdef MAC_OSX - err = FSUpdateAlias (NULL, &fref, alias, &changed); + err = FSResolveAlias (NULL, alias, &fref_proxy, &changed); + if (err == noErr) + err = FSCompareFSRefs (&fref, &fref_proxy); #else - err = UpdateAlias (NULL, &fss, alias, &changed); + err = ResolveAlias (NULL, alias, &fss_proxy, &changed); + if (err == noErr) + err = !(fss.vRefNum == fss_proxy.vRefNum + && fss.parID == fss_proxy.parID + && EqualString (fss.name, fss_proxy.name, + false, true)); #endif } if (err != noErr || alias == NULL) @@ -2051,11 +2060,11 @@ mac_update_title_bar (f, save_match_data) confusing. */ || (!MINI_WINDOW_P (w) && (modified_p != !NILP (w->last_had_star)))) - SetWindowModified (FRAME_MAC_WINDOW (f), - !MINI_WINDOW_P (w) && modified_p); - - if (windows_or_buffers_changed) - mac_update_proxy_icon (f); + { + SetWindowModified (FRAME_MAC_WINDOW (f), + !MINI_WINDOW_P (w) && modified_p); + mac_update_proxy_icon (f); + } #endif } @@ -4597,6 +4606,30 @@ This is for internal use only. Use `mac-font-panel-mode' instead. */) return Qnil; } #endif + +#if USE_ATSUI +extern Lisp_Object mac_atsu_font_face_attributes P_ ((ATSUFontID)); + +DEFUN ("mac-atsu-font-face-attributes", Fmac_atsu_font_face_attributes, + Smac_atsu_font_face_attributes, 1, 1, 0, + doc: /* Return plist of face attributes and values for ATSU font ID. +ID is specified by either an integer or a float. */) + (id) + Lisp_Object id; +{ + ATSUFontID font_id; + Lisp_Object result; + + check_mac (); + CHECK_NUMBER_OR_FLOAT(id); + font_id = NUMBERP (id) ? XINT (id) : (ATSUFontID) XFLOAT (id); + BLOCK_INPUT; + result = mac_atsu_font_face_attributes (font_id); + UNBLOCK_INPUT; + return result; +} +#endif + /*********************************************************************** Initialization @@ -4829,6 +4862,9 @@ Chinese, Japanese, and Korean. */); #if USE_MAC_FONT_PANEL defsubr (&Smac_set_font_panel_visibility); #endif +#if USE_ATSUI + defsubr (&Smac_atsu_font_face_attributes); +#endif } /* arch-tag: d7591289-f374-4377-b245-12f5dbbb8edc |