diff options
| author | David Reitter | 2008-08-20 17:39:14 +0000 |
|---|---|---|
| committer | David Reitter | 2008-08-20 17:39:14 +0000 |
| commit | 06197b17cd70c30efd518a3d93f193bb1c4753b5 (patch) | |
| tree | f84bcf1d2cd584ad435c20b3346e45cbc4d98821 /src | |
| parent | 679316788ea6c6f76ca8d0be94e02eeaa5dae2e2 (diff) | |
| download | emacs-06197b17cd70c30efd518a3d93f193bb1c4753b5.tar.gz emacs-06197b17cd70c30efd518a3d93f193bb1c4753b5.zip | |
ns_set_cursor_type: replace with generic from xfns.c
Diffstat (limited to 'src')
| -rw-r--r-- | src/nsfns.m | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/src/nsfns.m b/src/nsfns.m index d5da0fce160..d9909330b2e 100644 --- a/src/nsfns.m +++ b/src/nsfns.m | |||
| @@ -413,6 +413,8 @@ ns_set_background_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) | |||
| 413 | } | 413 | } |
| 414 | 414 | ||
| 415 | 415 | ||
| 416 | /* FIXME: adapt to generics */ | ||
| 417 | |||
| 416 | static void | 418 | static void |
| 417 | ns_set_cursor_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) | 419 | ns_set_cursor_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) |
| 418 | { | 420 | { |
| @@ -435,7 +437,6 @@ ns_set_cursor_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) | |||
| 435 | update_face_from_frame_parameter (f, Qcursor_color, arg); | 437 | update_face_from_frame_parameter (f, Qcursor_color, arg); |
| 436 | } | 438 | } |
| 437 | 439 | ||
| 438 | |||
| 439 | static void | 440 | static void |
| 440 | ns_set_icon_name (struct frame *f, Lisp_Object arg, Lisp_Object oldval) | 441 | ns_set_icon_name (struct frame *f, Lisp_Object arg, Lisp_Object oldval) |
| 441 | { | 442 | { |
| @@ -928,27 +929,18 @@ ns_cursor_type_to_lisp (int arg) | |||
| 928 | } | 929 | } |
| 929 | } | 930 | } |
| 930 | 931 | ||
| 931 | 932 | /* this is like x_set_cursor_type defined in xfns.c */ | |
| 932 | static void | 933 | void |
| 933 | ns_set_cursor_type (struct frame *f, Lisp_Object arg, Lisp_Object oldval) | 934 | ns_set_cursor_type (f, arg, oldval) |
| 935 | FRAME_PTR f; | ||
| 936 | Lisp_Object arg, oldval; | ||
| 934 | { | 937 | { |
| 935 | int val; | 938 | set_frame_cursor_types (f, arg); |
| 936 | |||
| 937 | val = ns_lisp_to_cursor_type (arg); | ||
| 938 | if (val >= 0) | ||
| 939 | { | ||
| 940 | f->output_data.ns->desired_cursor =val; | ||
| 941 | } | ||
| 942 | else | ||
| 943 | { | ||
| 944 | store_frame_param (f, Qcursor_type, oldval); | ||
| 945 | error ("the `cursor-type' frame parameter should be either `no', `box', \ | ||
| 946 | `hollow', `underscore' or `bar'."); | ||
| 947 | } | ||
| 948 | 939 | ||
| 949 | update_mode_lines++; | 940 | /* Make sure the cursor gets redrawn. */ |
| 941 | cursor_type_changed = 1; | ||
| 950 | } | 942 | } |
| 951 | 943 | ||
| 952 | 944 | ||
| 953 | /* 23: called to set mouse pointer color, but all other terms use it to | 945 | /* 23: called to set mouse pointer color, but all other terms use it to |
| 954 | initialize pointer types (and don't set the color ;) */ | 946 | initialize pointer types (and don't set the color ;) */ |