summaryrefslogtreecommitdiff
path: root/lisp/term/ns-win.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/term/ns-win.el')
-rw-r--r--lisp/term/ns-win.el44
1 files changed, 26 insertions, 18 deletions
diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el
index 76b1a414560..09bbc7be636 100644
--- a/lisp/term/ns-win.el
+++ b/lisp/term/ns-win.el
@@ -42,7 +42,7 @@
(eval-when-compile (require 'cl-lib))
(or (featurep 'ns)
(error "%s: Loading ns-win.el but not compiled for GNUstep/macOS"
- (invocation-name)))
+ invocation-name))
;; Documentation-purposes only: actually loaded in loadup.el.
(require 'frame)
@@ -125,7 +125,6 @@ The properties returned may include `top', `left', `height', and `width'."
(define-key global-map [?\s-h] 'ns-do-hide-emacs)
(define-key global-map [?\s-H] 'ns-do-hide-others)
(define-key global-map [?\M-\s-h] 'ns-do-hide-others)
-(define-key key-translation-map [?\M-\s-\u02D9] [?\M-\s-h])
(define-key global-map [?\s-j] 'exchange-point-and-mark)
(define-key global-map [?\s-k] 'kill-current-buffer)
(define-key global-map [?\s-l] 'goto-line)
@@ -142,8 +141,13 @@ The properties returned may include `top', `left', `height', and `width'."
(define-key global-map [?\s-x] 'kill-region)
(define-key global-map [?\s-y] 'ns-paste-secondary)
(define-key global-map [?\s-z] 'undo)
+(define-key global-map [?\s-+] 'text-scale-adjust)
+(define-key global-map [?\s-=] 'text-scale-adjust)
+(define-key global-map [?\s--] 'text-scale-adjust)
+(define-key global-map [?\s-0] 'text-scale-adjust)
(define-key global-map [?\s-|] 'shell-command-on-region)
(define-key global-map [s-kp-bar] 'shell-command-on-region)
+(define-key global-map [?\C-\s- ] 'ns-do-show-character-palette)
;; (as in Terminal.app)
(define-key global-map [s-right] 'ns-next-frame)
(define-key global-map [s-left] 'ns-prev-frame)
@@ -307,8 +311,8 @@ is currently being used."
"Insert contents of `ns-working-text' as UTF-8 string and mark with
`ns-working-overlay'. Any previously existing working text is cleared first.
The overlay is assigned the face `ns-working-text-face'."
- ;; FIXME: if buffer is read-only, don't try to insert anything
- ;; and if text is bound to a command, execute that instead (Bug#1453)
+ ;; FIXME: if buffer is read-only, don't try to insert anything, and
+ ;; if text is bound to a command, execute that instead (Bug#1453).
(interactive)
(ns-delete-working-text)
(let ((start (point)))
@@ -354,7 +358,7 @@ See `ns-insert-working-text'."
;; Used prior to Emacs 25.
(define-coding-system-alias 'utf-8-nfd 'utf-8-hfs)
- (set-file-name-coding-system 'utf-8-hfs))
+ (set-file-name-coding-system 'utf-8-hfs-unix))
;;;; Inter-app communications support.
@@ -437,14 +441,7 @@ Lines are highlighted according to `ns-input-line'."
;;;; File handling.
(defun x-file-dialog (prompt dir default_filename mustmatch only_dir_p)
-"Read file name, prompting with PROMPT in directory DIR.
-Use a file selection dialog. Select DEFAULT-FILENAME in the dialog's file
-selection box, if specified. If MUSTMATCH is non-nil, the returned file
-or directory must exist.
-
-This function is only defined on NS, MS Windows, and X Windows with the
-Motif or Gtk toolkits. With the Motif toolkit, ONLY-DIR-P is ignored.
-Otherwise, if ONLY-DIR-P is non-nil, the user can only select directories."
+ "SKIP: real doc in xfns.c."
(ns-read-file-name prompt dir mustmatch default_filename only_dir_p))
(defun ns-open-file-using-panel ()
@@ -556,8 +553,9 @@ the last file dropped is selected."
(defvar ns-right-control-modifier)
;; You say tomAYto, I say tomAHto..
-(defvaralias 'ns-option-modifier 'ns-alternate-modifier)
-(defvaralias 'ns-right-option-modifier 'ns-right-alternate-modifier)
+(with-no-warnings
+ (defvaralias 'ns-option-modifier 'ns-alternate-modifier)
+ (defvaralias 'ns-right-option-modifier 'ns-right-alternate-modifier))
(defun ns-do-hide-emacs ()
(interactive)
@@ -575,6 +573,12 @@ the last file dropped is selected."
(interactive)
(ns-emacs-info-panel))
+(declare-function ns-show-character-palette "nsfns.m" ())
+
+(defun ns-do-show-character-palette ()
+ (interactive)
+ (ns-show-character-palette))
+
(defun ns-next-frame ()
"Switch to next visible frame."
(interactive)
@@ -619,7 +623,7 @@ the last file dropped is selected."
(let ((last-nonmenu-event (if (listp last-nonmenu-event)
last-nonmenu-event
;; Fake it:
- `(mouse-1 POSITION 1))))
+ '(mouse-1 POSITION 1))))
(if (y-or-n-p (format "Print buffer %s? " (buffer-name)))
(print-buffer)
(error "Canceled")))
@@ -739,6 +743,10 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.")
;;;; macOS-like defaults for trackpad and mouse wheel scrolling on
;;;; macOS 10.7+.
+(defvar ns-version-string)
+(defvar mouse-wheel-scroll-amount)
+(defvar mouse-wheel-progressive-speed)
+
;; FIXME: This doesn't look right. Is there a better way to do this
;; that keeps customize happy?
(when (featurep 'cocoa)
@@ -801,8 +809,8 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.")
;; Set some options to be as Nextstep-like as possible.
-(setq frame-title-format t
- icon-title-format t)
+(setq frame-title-format "%b"
+ icon-title-format "%b")
(defvar ns-initialized nil