diff options
| author | Jan Djärv | 2011-12-18 14:49:38 +0100 |
|---|---|---|
| committer | Jan Djärv | 2011-12-18 14:49:38 +0100 |
| commit | c803b2b767f8ed06beb28106a03f23bc577cfdae (patch) | |
| tree | 605daf67747b4ec447f5e133d9dce821e0efc53f /lisp | |
| parent | e1b01a3a530809a1e84ecddff31faf85b94e79e7 (diff) | |
| download | emacs-c803b2b767f8ed06beb28106a03f23bc577cfdae.tar.gz emacs-c803b2b767f8ed06beb28106a03f23bc577cfdae.zip | |
NS selection bug fix and cleanup, see thread C-g crash in C-x C-f (OSX Lion).
Thread is on emacs-devel.
* lisp/term/ns-win.el (ns-get-selection-internal)
(ns-store-selection-internal): Declare.
(ns-store-cut-buffer-internal, ns-get-cut-buffer-internal): Declare
as obsolete.
(ns-get-pasteboard, ns-paste-secondary): Use
ns-get-selection-internal.
(ns-set-pasteboard, ns-copy-including-secondary): Use
ns-store-selection-internal.
* src/nsselect.m (CUT_BUFFER_SUPPORT): Remove define.
(symbol_to_nsstring): Fix indentation.
(ns_symbol_to_pb): New function.
(Fns_get_selection_internal): Renamed from Fns_get_cut_buffer_internal.
(Fns_rotate_cut_buffers_internal): Removed.
(Fns_store_selection_internal): Renamed from
Fns_store_cut_buffer_internal.
(ns_get_foreign_selection, Fx_own_selection_internal)
(Fx_disown_selection_internal, Fx_selection_exists_p)
(Fns_get_selection_internal, Fns_store_selection_internal): Use
ns_symbol_to_pb and check if return value is nil.
(syms_of_nsselect): Remove ifdef CUT_BUFFER_SUPPORT. Remove
defsubr Sns_rotate_cut_buffers_internal. Sns_get_cut_buffer_internal
renamed to Sns_get_selection_internal, Sns_store_cut_buffer_internal
renamed to Sns_store_selection_internal.
(ns_handle_selection_request): Move code to Fx_own_selection_internal
and remove this function.
(ns_handle_selection_clear): Remove, never used.
(Fx_own_selection_internal): Move code from ns_handle_selection_request
here.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 11 | ||||
| -rw-r--r-- | lisp/term/ns-win.el | 21 |
2 files changed, 24 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 990a7259bc8..9be0d2f1a3c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,14 @@ | |||
| 1 | 2011-12-18 Jan Djärv <jan.h.d@swipnet.se> | ||
| 2 | |||
| 3 | * term/ns-win.el (ns-get-selection-internal) | ||
| 4 | (ns-store-selection-internal): Declare. | ||
| 5 | (ns-store-cut-buffer-internal, ns-get-cut-buffer-internal): Declare | ||
| 6 | as obsolete. | ||
| 7 | (ns-get-pasteboard, ns-paste-secondary): Use | ||
| 8 | ns-get-selection-internal. | ||
| 9 | (ns-set-pasteboard, ns-copy-including-secondary): Use | ||
| 10 | ns-store-selection-internal. | ||
| 11 | |||
| 1 | 2011-12-17 Chong Yidong <cyd@gnu.org> | 12 | 2011-12-17 Chong Yidong <cyd@gnu.org> |
| 2 | 13 | ||
| 3 | * vc/vc.el (vc-next-action): Doc fix; remove CVS-isms. | 14 | * vc/vc.el (vc-next-action): Doc fix; remove CVS-isms. |
diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el index b639af7cda0..df0ddd7de8b 100644 --- a/lisp/term/ns-win.el +++ b/lisp/term/ns-win.el | |||
| @@ -702,19 +702,24 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.") | |||
| 702 | 702 | ||
| 703 | ;;;; Pasteboard support. | 703 | ;;;; Pasteboard support. |
| 704 | 704 | ||
| 705 | (declare-function ns-get-cut-buffer-internal "nsselect.m" (buffer)) | 705 | (declare-function ns-get-selection-internal "nsselect.m" (buffer)) |
| 706 | (declare-function ns-store-selection-internal "nsselect.m" (buffer string)) | ||
| 707 | |||
| 708 | (define-obsolete-function-alias 'ns-get-cut-buffer-internal | ||
| 709 | 'ns-get-selection-internal "24.1") | ||
| 710 | (define-obsolete-function-alias 'ns-store-cut-buffer-internal | ||
| 711 | 'ns-store-selection-internal "24.1") | ||
| 712 | |||
| 706 | 713 | ||
| 707 | (defun ns-get-pasteboard () | 714 | (defun ns-get-pasteboard () |
| 708 | "Returns the value of the pasteboard." | 715 | "Returns the value of the pasteboard." |
| 709 | (ns-get-cut-buffer-internal 'CLIPBOARD)) | 716 | (ns-get-selection-internal 'CLIPBOARD)) |
| 710 | |||
| 711 | (declare-function ns-store-cut-buffer-internal "nsselect.m" (buffer string)) | ||
| 712 | 717 | ||
| 713 | (defun ns-set-pasteboard (string) | 718 | (defun ns-set-pasteboard (string) |
| 714 | "Store STRING into the pasteboard of the Nextstep display server." | 719 | "Store STRING into the pasteboard of the Nextstep display server." |
| 715 | ;; Check the data type of STRING. | 720 | ;; Check the data type of STRING. |
| 716 | (if (not (stringp string)) (error "Nonstring given to pasteboard")) | 721 | (if (not (stringp string)) (error "Nonstring given to pasteboard")) |
| 717 | (ns-store-cut-buffer-internal 'CLIPBOARD string)) | 722 | (ns-store-selection-internal 'CLIPBOARD string)) |
| 718 | 723 | ||
| 719 | ;; We keep track of the last text selected here, so we can check the | 724 | ;; We keep track of the last text selected here, so we can check the |
| 720 | ;; current selection against it, and avoid passing back our own text | 725 | ;; current selection against it, and avoid passing back our own text |
| @@ -742,11 +747,11 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.") | |||
| 742 | (defun ns-copy-including-secondary () | 747 | (defun ns-copy-including-secondary () |
| 743 | (interactive) | 748 | (interactive) |
| 744 | (call-interactively 'kill-ring-save) | 749 | (call-interactively 'kill-ring-save) |
| 745 | (ns-store-cut-buffer-internal 'SECONDARY | 750 | (ns-store-selection-internal 'SECONDARY |
| 746 | (buffer-substring (point) (mark t)))) | 751 | (buffer-substring (point) (mark t)))) |
| 747 | (defun ns-paste-secondary () | 752 | (defun ns-paste-secondary () |
| 748 | (interactive) | 753 | (interactive) |
| 749 | (insert (ns-get-cut-buffer-internal 'SECONDARY))) | 754 | (insert (ns-get-selection-internal 'SECONDARY))) |
| 750 | 755 | ||
| 751 | 756 | ||
| 752 | ;;;; Scrollbar handling. | 757 | ;;;; Scrollbar handling. |