diff options
author | Po Lu <luangruo@yahoo.com> | 2022-05-01 21:39:33 +0800 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2022-05-01 21:39:54 +0800 |
commit | 9370a4763aacbb9278b5be9c92a2484e3652bc29 (patch) | |
tree | fdc5b0fe1c999e79443cf3fbd669f4b8428c6f68 /lisp/term | |
parent | 7c8bec9e1ffe087918f6f218fc4560fc968aebb2 (diff) | |
download | emacs-9370a4763aacbb9278b5be9c92a2484e3652bc29.tar.gz emacs-9370a4763aacbb9278b5be9c92a2484e3652bc29.tar.bz2 emacs-9370a4763aacbb9278b5be9c92a2484e3652bc29.zip |
Replace NS code that implemented font panels in a different way
* doc/emacs/macos.texi (Mac / GNUstep Events): Document removal
of `ns-change-font' event. The font panels are now implemented
normally, via `x-select-font'.
* lisp/term/common-win.el (x-setup-function-keys): Likewise.
* lisp/term/ns-win.el (global-map, ns-popup-font-panel): Remove.
(x-select-font, mouse-set-font, ns-input-font):
(ns-input-fontsize): Remove.
(ns-respond-to-change-font): Delete function.
* src/nsfns.m (Fns_popup_font_panel): Delete function.
(Fx_select_font): New function.
(syms_of_nsfns): Update subrs.
* src/nsterm.h (@interface EmacsView):
* src/nsterm.m (ns_select_1): New function.
(ns_select): Wrap around that instead.
([EmacsView changeFont:]): Exit nested event loop
([EmacsView showFontPanel:]): New function.
Diffstat (limited to 'lisp/term')
-rw-r--r-- | lisp/term/common-win.el | 1 | ||||
-rw-r--r-- | lisp/term/ns-win.el | 29 |
2 files changed, 0 insertions, 30 deletions
diff --git a/lisp/term/common-win.el b/lisp/term/common-win.el index b219014a73c..6f1e322aba5 100644 --- a/lisp/term/common-win.el +++ b/lisp/term/common-win.el @@ -65,7 +65,6 @@ (cons 4 'ns-drag-file) (cons 5 'ns-drag-color) (cons 6 'ns-drag-text) - (cons 7 'ns-change-font) (cons 8 'ns-open-file-line) ;;; (cons 9 'ns-insert-working-text) ;;; (cons 10 'ns-delete-working-text) diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el index 065ca235b40..6a414d83f18 100644 --- a/lisp/term/ns-win.el +++ b/lisp/term/ns-win.el @@ -176,7 +176,6 @@ The properties returned may include `top', `left', `height', and `width'." (define-key global-map [ns-power-off] 'save-buffers-kill-emacs) (define-key global-map [ns-open-file] 'ns-find-file) (define-key global-map [ns-open-temp-file] [ns-open-file]) -(define-key global-map [ns-change-font] 'ns-respond-to-change-font) (define-key global-map [ns-open-file-line] 'ns-open-file-select-line) (define-key global-map [ns-spi-service-call] 'ns-spi-service-call) (define-key global-map [ns-new-frame] 'make-frame) @@ -623,34 +622,6 @@ If FRAME is nil, the change applies to the selected frame." ;; Needed for font listing functions under both backend and normal (setq scalable-fonts-allowed t) -;; Set to use font panel instead -(declare-function ns-popup-font-panel "nsfns.m" (&optional frame)) -(defalias 'x-select-font 'ns-popup-font-panel "Pop up the font panel. -This function has been overloaded in Nextstep.") -(defalias 'mouse-set-font 'ns-popup-font-panel "Pop up the font panel. -This function has been overloaded in Nextstep.") - -;; nsterm.m -(defvar ns-input-font) -(defvar ns-input-fontsize) - -(defun ns-respond-to-change-font () - "Set the font chosen in the font-picker panel. -Respond to changeFont: event, expecting ns-input-font and -ns-input-fontsize of new font." - (interactive) - (let ((face 'default)) - (set-face-attribute face t - :family ns-input-font - :height (* 10 ns-input-fontsize)) - (set-face-attribute face (selected-frame) - :family ns-input-font - :height (* 10 ns-input-fontsize)) - (let ((spec (list (list t (face-attr-construct 'default))))) - (put face 'customized-face spec) - (custom-push-theme 'theme-face face 'user 'set spec) - (put face 'face-modified nil)))) - ;; Default fontset for macOS. This is mainly here to show how a fontset ;; can be set up manually. Ordinarily, fontsets are auto-created whenever ;; a font is chosen by |