Fix case of "GNUstep".
[bpt/emacs.git] / lisp / term / ns-win.el
index f11b34a..51de66e 100644 (file)
@@ -40,7 +40,7 @@
 
 
 (if (not (featurep 'ns))
-    (error "%s: Loading ns-win.el but not compiled for GNUStep/MacOS"
+    (error "%s: Loading ns-win.el but not compiled for GNUstep/MacOS"
           (invocation-name)))
 
 (eval-when-compile (require 'cl))
@@ -59,7 +59,6 @@
 ;; nsterm.m
 (defvar ns-version-string)
 (defvar ns-expand-space)
-(defvar ns-cursor-blink-rate)
 (defvar ns-alternate-modifier)
 
 ;;;; Command line argument handling.
@@ -159,8 +158,8 @@ The return value is ARGS minus the number of arguments processed."
        (setq args (cons orig-this-switch args)))))
   (nreverse args))
 
-(defun x-parse-geometry (geom)
-  "Parse a Nextstep-style geometry string STRING.
+(defun ns-parse-geometry (geom)
+  "Parse a Nextstep-style geometry string GEOM.
 Returns an alist of the form ((top . TOP), (left . LEFT) ... ).
 The properties returned may include `top', `left', `height', and `width'."
   (when (string-match "\\([0-9]+\\)\\( \\([0-9]+\\)\\( \\([0-9]+\\)\
@@ -179,18 +178,20 @@ The properties returned may include `top', `left', `height', and `width'."
 
 ;;;; Keyboard mapping.
 
-;;TODO: all terms have these, but they don't seem necessary.
+;; These tell read-char how to convert these special chars to ASCII.
+;;TODO: all terms have these, and at least the return mapping is necessary
+;;      for tramp to recognize the enter key.
+;;      Perhaps they should be moved into common code somewhere
+;;      (when a window system is active).
 ;;      Remove if no problems for some time after 2008-08-06.
-;; These tell read-char how to convert
-;; these special chars to ASCII.
-;;(put 'backspace 'ascii-character 127)
-;;(put 'delete 'ascii-character 127)
-;;(put 'tab 'ascii-character ?\t)
-;;(put 'S-tab 'ascii-character (logior 16 ?\t))
-;;(put 'linefeed 'ascii-character ?\n)
-;;(put 'clear 'ascii-character 12)
-;;(put 'return 'ascii-character 13)
-;;(put 'escape 'ascii-character ?\e)
+(put 'backspace 'ascii-character 127)
+(put 'delete 'ascii-character 127)
+(put 'tab 'ascii-character ?\t)
+(put 'S-tab 'ascii-character (logior 16 ?\t))
+(put 'linefeed 'ascii-character ?\n)
+(put 'clear 'ascii-character 12)
+(put 'return 'ascii-character 13)
+(put 'escape 'ascii-character ?\e)
 
 
 (defvar ns-alternatives-map
@@ -749,6 +750,8 @@ this defaults to \"printenv\"."
 (defvar ns-input-spi-name)
 (defvar ns-input-spi-arg)
 
+(declare-function dnd-open-file "dnd" (uri action))
+
 (defun ns-spi-service-call ()
   "Respond to a service request."
   (interactive)
@@ -991,10 +994,6 @@ Lines are highlighted according to `ns-input-line'."
   (ns-set-resource nil "CommandModifier" (symbol-name ns-command-modifier))
   (ns-set-resource nil "ControlModifier" (symbol-name ns-control-modifier))
   (ns-set-resource nil "FunctionModifier" (symbol-name ns-function-modifier))
-  (ns-set-resource nil "CursorBlinkRate"
-                   (if ns-cursor-blink-rate
-                       (number-to-string ns-cursor-blink-rate)
-                     "NO"))
   (ns-set-resource nil "ExpandSpace"
                    (if ns-expand-space
                        (number-to-string ns-expand-space)
@@ -1209,6 +1208,9 @@ unless the current buffer is a scratch buffer.")
 ;; (if this is not done, modeline is dimmed until first interaction)
 (add-hook 'after-make-frame-functions 'select-frame)
 
+(defvar tool-bar-mode)
+(declare-function tool-bar-mode "tool-bar" (&optional arg))
+
 ;; Based on a function by David Reitter <dreitter@inf.ed.ac.uk> ;
 ;; see http://lists.gnu.org/archive/html/emacs-devel/2005-09/msg00681.html .
 (defun ns-toggle-toolbar (&optional frame)
@@ -1221,28 +1223,6 @@ unless the current buffer is a scratch buffer.")
                                   0 1)) ))
   (if (not tool-bar-mode) (tool-bar-mode t)))
 
-(defvar ns-cursor-blink-mode)          ; nsterm.m
-
-;; Redefine from frame.el.
-(define-minor-mode blink-cursor-mode
-  "Toggle blinking cursor mode.
-With a numeric argument, turn blinking cursor mode on if ARG is positive,
-otherwise turn it off.  When blinking cursor mode is enabled, the
-cursor of the selected window blinks.
-
-Note that this command is effective only when Emacs
-displays through a window system, because then Emacs does its own
-cursor display.  On a text-only terminal, this is not implemented."
-  :init-value (not (or noninteractive
-                      no-blinking-cursor
-                      (eq ns-cursor-blink-rate nil)))
-  :initialize 'custom-initialize-safe-default
-  :group 'cursor
-  :global t
-  (if blink-cursor-mode
-      (setq ns-cursor-blink-mode t)
-      (setq ns-cursor-blink-mode nil)))
-
 
 
 ;;;; Dialog-related functions.
@@ -1397,6 +1377,8 @@ See the documentation of `create-fontset-from-fontset-spec for the format.")
 (global-unset-key [vertical-scroll-bar mouse-1])
 (global-unset-key [vertical-scroll-bar drag-mouse-1])
 
+(declare-function scroll-bar-scale "scroll-bar" (num-denom whole))
+
 (defun ns-scroll-bar-move (event)
   "Scroll the frame according to a Nextstep scroller event."
   (interactive "e")
@@ -1561,6 +1543,8 @@ Note, tranparency works better on Tiger (10.4) and higher."
   "Non-nil if Nextstep windowing has been initialized.")
 
 (declare-function ns-list-services "nsfns.m" ())
+(declare-function x-open-connection "xfns.c"
+                  (display &optional xrm-string must-succeed))
 
 ;; Do the actual Nextstep Windows setup here; the above code just
 ;; defines functions and variables that we use now.