aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Robert2009-01-25 19:50:16 +0000
committerAdrian Robert2009-01-25 19:50:16 +0000
commit33b357927cbd64349f0705c2aa3a7b6360263c5b (patch)
tree9c65b4ebbb44fbbc9527c89fe597b4a4d0b67ba8
parent8612b71a44b34519fe1b047a9f1d6f6b1431d411 (diff)
downloademacs-33b357927cbd64349f0705c2aa3a7b6360263c5b.tar.gz
emacs-33b357927cbd64349f0705c2aa3a7b6360263c5b.zip
* term/ns-win.el (ns-insert-working-text, ns-delete-working-text):
Remove from global map and key definitions. (ns-toggle-toolbar, ns-info-prefs): Add to global map and key definitions. (ns-show-preferences-help, ns-unput-working-text): New functions. (ns-unecho-working-text): Update message.
-rw-r--r--lisp/ChangeLog9
-rw-r--r--lisp/term/ns-win.el34
2 files changed, 33 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b9cc87e19de..6049c1e4ec1 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,12 @@
12009-01-25 Adrian Robert <Adrian.B.Robert@gmail.com>
2
3 * term/ns-win.el (ns-insert-working-text, ns-delete-working-text):
4 Remove from global map and key definitions.
5 (ns-toggle-toolbar, ns-info-prefs): Add to global map and key
6 definitions.
7 (ns-show-preferences-help, ns-unput-working-text): New functions.
8 (ns-unecho-working-text): Update message.
9
12009-01-25 Craig Markwardt <cbmarkwardt@gmail.com> 102009-01-25 Craig Markwardt <cbmarkwardt@gmail.com>
2 11
3 * calendar/icalendar.el (icalendar-uid-format): New defcustom 12 * calendar/icalendar.el (icalendar-uid-format): New defcustom
diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el
index 6fa0a09dfab..bb37ecbb705 100644
--- a/lisp/term/ns-win.el
+++ b/lisp/term/ns-win.el
@@ -289,11 +289,10 @@ The properties returned may include `top', `left', `height', and `width'."
289(define-key global-map [ns-drag-text] 'ns-insert-text) 289(define-key global-map [ns-drag-text] 'ns-insert-text)
290(define-key global-map [ns-change-font] 'ns-respond-to-change-font) 290(define-key global-map [ns-change-font] 'ns-respond-to-change-font)
291(define-key global-map [ns-open-file-line] 'ns-open-file-select-line) 291(define-key global-map [ns-open-file-line] 'ns-open-file-select-line)
292(define-key global-map [ns-insert-working-text] 'ns-insert-working-text)
293(define-key global-map [ns-delete-working-text] 'ns-delete-working-text)
294(define-key global-map [ns-spi-service-call] 'ns-spi-service-call) 292(define-key global-map [ns-spi-service-call] 'ns-spi-service-call)
295(define-key global-map [ns-new-frame] 'make-frame) 293(define-key global-map [ns-new-frame] 'make-frame)
296 294(define-key global-map [ns-toggle-toolbar] 'ns-toggle-toolbar)
295(define-key global-map [ns-info-prefs] 'ns-show-preferences-help)
297 296
298 297
299;; Functions to set environment variables by running a subshell. 298;; Functions to set environment variables by running a subshell.
@@ -398,10 +397,12 @@ this defaults to \"printenv\"."
398 (cons (logior (lsh 0 16) 6) 'ns-drag-text) 397 (cons (logior (lsh 0 16) 6) 'ns-drag-text)
399 (cons (logior (lsh 0 16) 7) 'ns-change-font) 398 (cons (logior (lsh 0 16) 7) 'ns-change-font)
400 (cons (logior (lsh 0 16) 8) 'ns-open-file-line) 399 (cons (logior (lsh 0 16) 8) 'ns-open-file-line)
401 (cons (logior (lsh 0 16) 9) 'ns-insert-working-text) 400; (cons (logior (lsh 0 16) 9) 'ns-insert-working-text)
402 (cons (logior (lsh 0 16) 10) 'ns-delete-working-text) 401; (cons (logior (lsh 0 16) 10) 'ns-delete-working-text)
403 (cons (logior (lsh 0 16) 11) 'ns-spi-service-call) 402 (cons (logior (lsh 0 16) 11) 'ns-spi-service-call)
404 (cons (logior (lsh 0 16) 12) 'ns-new-frame) 403 (cons (logior (lsh 0 16) 12) 'ns-new-frame)
404 (cons (logior (lsh 0 16) 13) 'ns-toggle-toolbar)
405 (cons (logior (lsh 0 16) 14) 'ns-info-prefs)
405 (cons (logior (lsh 1 16) 32) 'f1) 406 (cons (logior (lsh 1 16) 32) 'f1)
406 (cons (logior (lsh 1 16) 33) 'f2) 407 (cons (logior (lsh 1 16) 33) 'f2)
407 (cons (logior (lsh 1 16) 34) 'f3) 408 (cons (logior (lsh 1 16) 34) 'f3)
@@ -684,7 +685,7 @@ this defaults to \"printenv\"."
684 (interactive) 685 (interactive)
685 (ns-arrange-frames nil)) 686 (ns-arrange-frames nil))
686 687
687(defun ns-arrange-frames ( vis) 688(defun ns-arrange-frames (vis)
688 (let ((frame (next-frame)) 689 (let ((frame (next-frame))
689 (end-frame (selected-frame)) 690 (end-frame (selected-frame))
690 (inc-x 20) ;relative position of frames 691 (inc-x 20) ;relative position of frames
@@ -792,8 +793,10 @@ this defaults to \"printenv\"."
792 "Length of working text during compose sequence insert.") 793 "Length of working text during compose sequence insert.")
793(make-variable-buffer-local 'ns-working-overlay-len) 794(make-variable-buffer-local 'ns-working-overlay-len)
794 795
795;; Based on mac-win.el 2007/08/26 unicode-2. This will fail if called 796(defvar ns-working-text) ; nsterm.m
796;; from an "interactive" function. 797
798;; Test if in echo area, based on mac-win.el 2007/08/26 unicode-2.
799;; This will fail if called from a NONASCII_KEYSTROKE event on the global map.
797(defun ns-in-echo-area () 800(defun ns-in-echo-area ()
798 "Whether, for purposes of inserting working composition text, the minibuffer 801 "Whether, for purposes of inserting working composition text, the minibuffer
799is currently being used." 802is currently being used."
@@ -812,16 +815,20 @@ is currently being used."
812;; The 'interactive' here stays for subinvocations, so the ns-in-echo-area 815;; The 'interactive' here stays for subinvocations, so the ns-in-echo-area
813;; always returns nil for some reason. If this WASN'T the case, we could 816;; always returns nil for some reason. If this WASN'T the case, we could
814;; map this to [ns-insert-working-text] and eliminate Fevals in nsterm.m. 817;; map this to [ns-insert-working-text] and eliminate Fevals in nsterm.m.
818;; These functions test whether in echo area and delegate accordingly.
815(defun ns-put-working-text () 819(defun ns-put-working-text ()
816 (interactive) 820 (interactive)
817 (if (ns-in-echo-area) (ns-echo-working-text) (ns-insert-working-text))) 821 (if (ns-in-echo-area) (ns-echo-working-text) (ns-insert-working-text)))
818 822(defun ns-unput-working-text ()
819(defvar ns-working-text) ; nsterm.m 823 (interactive)
824 (if (ns-in-echo-area) (ns-unecho-working-text) (ns-delete-working-text)))
820 825
821(defun ns-insert-working-text () 826(defun ns-insert-working-text ()
822 "Insert contents of ns-working-text as UTF8 string and mark with 827 "Insert contents of ns-working-text as UTF8 string and mark with
823ns-working-overlay. Any previously existing working text is cleared first. 828ns-working-overlay. Any previously existing working text is cleared first.
824The overlay is assigned the face ns-working-text-face." 829The overlay is assigned the face ns-working-text-face."
830;; FIXME: if buffer is read-only, don't try to insert anything
831;; and if text is bound to a command, execute that instead (Bug#1453)
825 (interactive) 832 (interactive)
826 (if ns-working-overlay (ns-delete-working-text)) 833 (if ns-working-overlay (ns-delete-working-text))
827 (let ((start (point))) 834 (let ((start (point)))
@@ -857,6 +864,7 @@ See ns-insert-working-text."
857 (let ((msg (current-message)) 864 (let ((msg (current-message))
858 message-log-max) 865 message-log-max)
859 (setq msg (substring msg 0 (- (length msg) ns-working-overlay-len))) 866 (setq msg (substring msg 0 (- (length msg) ns-working-overlay-len)))
867 (message "%s" msg)
860 (setq ns-working-overlay-len 0) 868 (setq ns-working-overlay-len 0)
861 (setq ns-working-overlay nil))) 869 (setq ns-working-overlay nil)))
862 870
@@ -1229,6 +1237,12 @@ unless the current buffer is a scratch buffer.")
1229 1237
1230;;;; Dialog-related functions. 1238;;;; Dialog-related functions.
1231 1239
1240
1241(defun ns-show-preferences-help ()
1242 "Show NS Preferences panel section in the Emacs manual"
1243 (interactive)
1244 (info "(emacs)Mac / GNUstep Customization"))
1245
1232;; Ask user for confirm before printing. Due to Kevin Rodgers. 1246;; Ask user for confirm before printing. Due to Kevin Rodgers.
1233(defun ns-print-buffer () 1247(defun ns-print-buffer ()
1234 "Interactive front-end to `print-buffer': asks for user confirmation first." 1248 "Interactive front-end to `print-buffer': asks for user confirmation first."