summaryrefslogtreecommitdiff
path: root/src/macselect.c
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2006-04-17 08:41:12 +0000
committerMiles Bader <miles@gnu.org>2006-04-17 08:41:12 +0000
commitcfc2051d0ed5a268528a647ab0911a2f5cc451de (patch)
treecb622fe0b6c1ba8b97314fb80ba2fd8fad60a5a2 /src/macselect.c
parentca49cf1703cc20d50653c32ca2f438c8819b78bd (diff)
parente4a89ccf738861d7b9c4f611185aa0f204c9c208 (diff)
downloademacs-cfc2051d0ed5a268528a647ab0911a2f5cc451de.tar.gz
emacs-cfc2051d0ed5a268528a647ab0911a2f5cc451de.tar.bz2
emacs-cfc2051d0ed5a268528a647ab0911a2f5cc451de.zip
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-56
Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 204-225) - Update from CVS - Sync from erc--emacs--0 - Merge from gnus--rel--5.10 - Improve tq.el. - Update from CVS: src/puresize.h (PURESIZE_RATIO): Reduce to 10/6. * gnus--rel--5.10 (patch 81-85) - Update from CVS - Merge from emacs--devo--0
Diffstat (limited to 'src/macselect.c')
-rw-r--r--src/macselect.c74
1 files changed, 38 insertions, 36 deletions
diff --git a/src/macselect.c b/src/macselect.c
index 066892adce0..8312197181f 100644
--- a/src/macselect.c
+++ b/src/macselect.c
@@ -153,7 +153,6 @@ static ScrapFlavorType
get_flavor_type_from_symbol (sym)
Lisp_Object sym;
{
- ScrapFlavorType val;
Lisp_Object str = Fget (sym, Qmac_ostype);
if (STRINGP (str) && SBYTES (str) == 4)
@@ -322,17 +321,19 @@ get_scrap_private_timestamp (scrap, timestamp)
err = GetScrapFlavorFlags (scrap, SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP, &flags);
if (err == noErr)
- if (!(flags & kScrapFlavorMaskSenderOnly))
- err = noTypeErr;
- else
- {
- Size size = sizeof (*timestamp);
+ {
+ if (!(flags & kScrapFlavorMaskSenderOnly))
+ err = noTypeErr;
+ else
+ {
+ Size size = sizeof (*timestamp);
- err = GetScrapFlavorData (scrap, SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP,
- &size, timestamp);
- if (err == noErr && size != sizeof (*timestamp))
- err = noTypeErr;
- }
+ err = GetScrapFlavorData (scrap, SCRAP_FLAVOR_TYPE_EMACS_TIMESTAMP,
+ &size, timestamp);
+ if (err == noErr && size != sizeof (*timestamp))
+ err = noTypeErr;
+ }
+ }
#else /* !TARGET_API_MAC_CARBON */
Handle handle;
SInt32 size, offset;
@@ -683,18 +684,20 @@ x_get_foreign_selection (selection_symbol, target_type, time_stamp)
err = get_scrap_from_symbol (selection_symbol, 0, &scrap);
if (err == noErr && scrap)
- if (EQ (target_type, QTARGETS))
- {
- result = get_scrap_target_type_list (scrap);
- result = Fvconcat (1, &result);
- }
- else
- {
- result = get_scrap_string (scrap, target_type);
- if (STRINGP (result))
- Fput_text_property (make_number (0), make_number (SBYTES (result)),
- Qforeign_selection, target_type, result);
- }
+ {
+ if (EQ (target_type, QTARGETS))
+ {
+ result = get_scrap_target_type_list (scrap);
+ result = Fvconcat (1, &result);
+ }
+ else
+ {
+ result = get_scrap_string (scrap, target_type);
+ if (STRINGP (result))
+ Fput_text_property (make_number (0), make_number (SBYTES (result)),
+ Qforeign_selection, target_type, result);
+ }
+ }
UNBLOCK_INPUT;
@@ -1009,7 +1012,7 @@ defer_apple_events (apple_event, reply)
/* Mac OS 10.3 Xcode manual says AESuspendTheCurrentEvent makes
copies of the Apple event and the reply, but Mac OS 10.4 Xcode
manual says it doesn't. Anyway we create copies of them and save
- it in `deferred_apple_events'. */
+ them in `deferred_apple_events'. */
if (err == noErr)
{
if (deferred_apple_events.buf == NULL)
@@ -1123,11 +1126,8 @@ DEFUN ("mac-process-deferred-apple-events", Fmac_process_deferred_apple_events,
doc: /* Process Apple events that are deferred at the startup time. */)
()
{
- OSErr err;
Lisp_Object result = Qnil;
- long i, count;
- AppleEvent apple_event, reply;
- AEKeyword keyword;
+ long i;
if (mac_ready_for_apple_events)
return Qnil;
@@ -1207,14 +1207,16 @@ copy_scrap_flavor_data (from_scrap, to_scrap, flavor_type)
break;
}
if (err == noErr)
- if (buf == NULL)
- err = memFullErr;
- else
- {
- err = PutScrapFlavor (to_scrap, flavor_type, kScrapFlavorMaskNone,
- size, buf);
- xfree (buf);
- }
+ {
+ if (buf == NULL)
+ err = memFullErr;
+ else
+ {
+ err = PutScrapFlavor (to_scrap, flavor_type, kScrapFlavorMaskNone,
+ size, buf);
+ xfree (buf);
+ }
+ }
return err;
}