⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 w32-win.el

📁 windows版本的emacs
💻 EL
📖 第 1 页 / 共 3 页
字号:
		   "beige"		   "burlywood"		   "peru"		   "sienna"		   "SaddleBrown"		   "saddle brown"		   "IndianRed"		   "indian red"		   "RosyBrown"		   "rosy brown"		   "DarkGoldenrod"		   "dark goldenrod"		   "goldenrod"		   "LightGoldenrod"		   "light goldenrod"		   "gold"		   "yellow"		   "LightYellow"		   "light yellow"		   "LightGoldenrodYellow"		   "light goldenrod yellow"		   "PaleGoldenrod"		   "pale goldenrod"		   "khaki"		   "DarkKhaki"		   "dark khaki"		   "OliveDrab"		   "olive drab"		   "ForestGreen"		   "forest green"		   "YellowGreen"		   "yellow green"		   "LimeGreen"		   "lime green"		   "GreenYellow"		   "green yellow"		   "MediumSpringGreen"		   "medium spring green"		   "chartreuse"		   "green"		   "LawnGreen"		   "lawn green"		   "SpringGreen"		   "spring green"		   "PaleGreen"		   "pale green"		   "LightSeaGreen"		   "light sea green"		   "MediumSeaGreen"		   "medium sea green"		   "SeaGreen"		   "sea green"		   "DarkSeaGreen"		   "dark sea green"		   "DarkOliveGreen"		   "dark olive green"		   "DarkGreen"		   "dark green"		   "aquamarine"		   "MediumAquamarine"		   "medium aquamarine"		   "CadetBlue"		   "cadet blue"		   "LightCyan"		   "light cyan"		   "cyan"		   "turquoise"		   "MediumTurquoise"		   "medium turquoise"		   "DarkTurquoise"		   "dark turquoise"		   "PaleTurquoise"		   "pale turquoise"		   "PowderBlue"		   "powder blue"		   "LightBlue"		   "light blue"		   "LightSteelBlue"		   "light steel blue"		   "SteelBlue"		   "steel blue"		   "LightSkyBlue"		   "light sky blue"		   "SkyBlue"		   "sky blue"		   "DeepSkyBlue"		   "deep sky blue"		   "DodgerBlue"		   "dodger blue"		   "blue"		   "RoyalBlue"		   "royal blue"		   "MediumBlue"		   "medium blue"		   "LightSlateBlue"		   "light slate blue"		   "MediumSlateBlue"		   "medium slate blue"		   "SlateBlue"		   "slate blue"		   "DarkSlateBlue"		   "dark slate blue"		   "CornflowerBlue"		   "cornflower blue"		   "NavyBlue"		   "navy blue"		   "navy"		   "MidnightBlue"		   "midnight blue"		   "LightGray"		   "light gray"		   "LightGrey"		   "light grey"		   "grey"		   "gray"		   "LightSlateGrey"		   "light slate grey"		   "LightSlateGray"		   "light slate gray"		   "SlateGrey"		   "slate grey"		   "SlateGray"		   "slate gray"		   "DimGrey"		   "dim grey"		   "DimGray"		   "dim gray"		   "DarkSlateGrey"		   "dark slate grey"		   "DarkSlateGray"		   "dark slate gray"		   "black"		   "white"		   "MistyRose"		   "misty rose"		   "LavenderBlush"		   "lavender blush"		   "lavender"		   "AliceBlue"		   "alice blue"		   "azure"		   "MintCream"		   "mint cream"		   "honeydew"		   "seashell"		   "LemonChiffon"		   "lemon chiffon"		   "ivory"		   "cornsilk"		   "moccasin"		   "NavajoWhite"		   "navajo white"		   "PeachPuff"		   "peach puff"		   "bisque"		   "BlanchedAlmond"		   "blanched almond"		   "PapayaWhip"		   "papaya whip"		   "AntiqueWhite"		   "antique white"		   "linen"		   "OldLace"		   "old lace"		   "FloralWhite"		   "floral white"		   "gainsboro"		   "WhiteSmoke"		   "white smoke"		   "GhostWhite"		   "ghost white"		   "snow")  "The list of X colors from the `rgb.txt' file.XConsortium: rgb.txt,v 10.41 94/02/20 18:39:36 rws Exp")(defun xw-defined-colors (&optional frame)  "Internal function called by `defined-colors', which see."  (or frame (setq frame (selected-frame)))  (let* ((color-map-colors (mapcar (lambda (clr) (car clr)) w32-color-map))	 (all-colors (or color-map-colors x-colors))	 (this-color nil)	 (defined-colors nil))    (message "Defining colors...")    (while all-colors      (setq this-color (car all-colors)	    all-colors (cdr all-colors))      (and (color-supported-p this-color frame t)	   (setq defined-colors (cons this-color defined-colors))))    defined-colors));;;; Function keys;;; make f10 activate the real menubar rather than the mini-buffer menu;;; navigation feature.(global-set-key [f10] (lambda ()			(interactive) (w32-send-sys-command ?\xf100)))(defun iconify-or-deiconify-frame ()  "Iconify the selected frame, or deiconify if it's currently an icon."  (interactive)  (if (eq (cdr (assq 'visibility (frame-parameters))) t)      (iconify-frame)    (make-frame-visible)))(substitute-key-definition 'suspend-emacs 'iconify-or-deiconify-frame			   global-map);;; Do the actual Windows setup here; the above code just defines;;; functions and variables that we use now.(setq command-line-args (x-handle-args command-line-args));;; Make sure we have a valid resource name.(or (stringp x-resource-name)    (let (i)      (setq x-resource-name (invocation-name))      ;; Change any . or * characters in x-resource-name to hyphens,      ;; so as not to choke when we use it in X resource queries.      (while (setq i (string-match "[.*]" x-resource-name))	(aset x-resource-name i ?-))));; For the benefit of older Emacses (19.27 and earlier) that are sharing;; the same lisp directory, don't pass the third argument unless we seem;; to have the multi-display support.(if (fboundp 'x-close-connection)    (x-open-connection ""		       x-command-line-resources		       ;; Exit Emacs with fatal error if this fails.		       t)  (x-open-connection ""		     x-command-line-resources))(setq frame-creation-function 'x-create-frame-with-faces)(setq x-cut-buffer-max (min (- (/ (x-server-max-request-size) 2) 100)			    x-cut-buffer-max));; W32 expects the menu bar cut and paste commands to use the clipboard.;; This has ,? to match both on Sunos and on Solaris.(menu-bar-enable-clipboard);; W32 systems have different fonts than commonly found on X, so;; we define our own standard fontset here.(defvar w32-standard-fontset-spec "-*-Courier New-normal-r-*-*-13-*-*-*-c-*-fontset-standard" "String of fontset spec of the standard fontset.This defines a fontset consisting of the Courier New variations forEuropean languages which are distributed with Windows as\"Multilanguage Support\".See the documentation of `create-fontset-from-fontset-spec for the format.")(if (fboundp 'new-fontset)    (progn      ;; Create the standard fontset.      (create-fontset-from-fontset-spec w32-standard-fontset-spec t)      ;; Create fontset specified in X resources "Fontset-N" (N is 0, 1,...).      (create-fontset-from-x-resource)      ;; Try to create a fontset from a font specification which comes      ;; from initial-frame-alist, default-frame-alist, or X resource.      ;; A font specification in command line argument (i.e. -fn XXXX)      ;; should be already in default-frame-alist as a `font'      ;; parameter.  However, any font specifications in site-start      ;; library, user's init file (.emacs), and default.el are not      ;; yet handled here.      (let ((font (or (cdr (assq 'font initial-frame-alist))                      (cdr (assq 'font default-frame-alist))                      (x-get-resource "font" "Font")))            xlfd-fields resolved-name)        (if (and font                 (not (query-fontset font))                 (setq resolved-name (x-resolve-font-name font))                 (setq xlfd-fields (x-decompose-font-name font)))            (if (string= "fontset"                         (aref xlfd-fields xlfd-regexp-registry-subnum))                (new-fontset font                             (x-complement-fontset-spec xlfd-fields nil))              ;; Create a fontset from FONT.  The fontset name is              ;; generated from FONT.              (create-fontset-from-ascii-font font					      resolved-name "startup"))))));; Apply a geometry resource to the initial frame.  Put it at the end;; of the alist, so that anything specified on the command line takes;; precedence.(let* ((res-geometry (x-get-resource "geometry" "Geometry"))       parsed)  (if res-geometry      (progn	(setq parsed (x-parse-geometry res-geometry))	;; If the resource specifies a position,	;; call the position and size "user-specified".	(if (or (assq 'top parsed) (assq 'left parsed))	    (setq parsed (cons '(user-position . t)			       (cons '(user-size . t) parsed))))	;; All geometry parms apply to the initial frame.	(setq initial-frame-alist (append initial-frame-alist parsed))	;; The size parms apply to all frames.	(if (assq 'height parsed)	    (setq default-frame-alist		  (cons (cons 'height (cdr (assq 'height parsed)))			default-frame-alist)))	(if (assq 'width parsed)	    (setq default-frame-alist		  (cons (cons 'width (cdr (assq 'width parsed)))			default-frame-alist))))));; Check the reverseVideo resource.(let ((case-fold-search t))  (let ((rv (x-get-resource "reverseVideo" "ReverseVideo")))    (if (and rv	     (string-match "^\\(true\\|yes\\|on\\)$" rv))	(setq default-frame-alist	      (cons '(reverse . t) default-frame-alist)))))(defun x-win-suspend-error ()  "Report an error when a suspend is attempted."  (error "Suspending an Emacs running under W32 makes no sense"))(add-hook 'suspend-hook 'x-win-suspend-error);;; Turn off window-splitting optimization; w32 is usually fast enough;;; that this is only annoying.(setq split-window-keep-point t);; Don't show the frame name; that's redundant.(setq-default mode-line-frame-identification "  ");;; Set to a system sound if you want a fancy bell.(set-message-beep 'ok);; Remap some functions to call w32 common dialogs(defun internal-face-interactive (what &optional bool)  (let* ((fn (intern (concat "face-" what)))	 (prompt (concat "Set " what " of face "))	 (face (read-face-name prompt))	 (default (if (fboundp fn)		      (or (funcall fn face (selected-frame))			  (funcall fn 'default (selected-frame)))))	 (fn-win (intern (concat (symbol-name window-system) "-select-" what)))	 value)    (setq value	  (cond ((fboundp fn-win)		 (funcall fn-win))		((eq bool 'color)		 (completing-read (concat prompt " " (symbol-name face) " to: ")				  (mapcar (function (lambda (color)						      (cons color color)))					  x-colors)				  nil nil nil nil default))		(bool		 (y-or-n-p (concat "Should face " (symbol-name face)				   " be " bool "? ")))		(t		 (read-string (concat prompt " " (symbol-name face) " to: ")			      nil nil default))))    (list face (if (equal value "") nil value))));; Redefine the font selection to use the standard W32 dialog(defvar w32-use-w32-font-dialog t  "*Use the standard font dialog if 't'.Otherwise pop up a menu of some standard fonts like X does - includingfontsets.")(defvar w32-fixed-font-alist  '("Font menu"    ("Misc"     ;; For these, we specify the pixel height and width.     ("fixed" "Fixedsys")     ("")     ("Terminal 5x4"      "-*-Terminal-normal-r-*-*-*-45-*-*-c-40-*-oem")     ("Terminal 6x8"      "-*-Terminal-normal-r-*-*-*-60-*-*-c-80-*-oem")     ("Terminal 9x5"      "-*-Terminal-normal-r-*-*-*-90-*-*-c-50-*-oem")     ("Terminal 9x7"      "-*-Terminal-normal-r-*-*-*-90-*-*-c-70-*-oem")     ("Terminal 9x8"      "-*-Terminal-normal-r-*-*-*-90-*-*-c-80-*-oem")     ("Terminal 12x12"      "-*-Terminal-normal-r-*-*-*-120-*-*-c-120-*-oem")     ("Terminal 14x10"      "-*-Terminal-normal-r-*-*-*-135-*-*-c-100-*-oem")     ("Terminal 6x6 Bold"      "-*-Terminal-bold-r-*-*-*-60-*-*-c-60-*-oem")     ("")     ("Lucida Sans Typewriter.8"      "-*-Lucida Sans Typewriter-normal-r-*-*-11-*-*-*-c-*-iso8859-1")     ("Lucida Sans Typewriter.9"      "-*-Lucida Sans Typewriter-normal-r-*-*-12-*-*-*-c-*-iso8859-1")     ("Lucida Sans Typewriter.10"      "-*-Lucida Sans Typewriter-normal-r-*-*-13-*-*-*-c-*-iso8859-1")     ("Lucida Sans Typewriter.11"      "-*-Lucida Sans Typewriter-normal-r-*-*-15-*-*-*-c-*-iso8859-1")     ("Lucida Sans Typewriter.12"      "-*-Lucida Sans Typewriter-normal-r-*-*-16-*-*-*-c-*-iso8859-1")     ("Lucida Sans Typewriter.8 Bold"      "-*-Lucida Sans Typewriter-semibold-r-*-*-11-*-*-*-c-*-iso8859-1")     ("Lucida Sans Typewriter.9 Bold"      "-*-Lucida Sans Typewriter-semibold-r-*-*-12-*-*-*-c-*-iso8859-1")     ("Lucida Sans Typewriter.10 Bold"      "-*-Lucida Sans Typewriter-semibold-r-*-*-13-*-*-*-c-*-iso8859-1")     ("Lucida Sans Typewriter.11 Bold"      "-*-Lucida Sans Typewriter-semibold-r-*-*-15-*-*-*-c-*-iso8859-1")     ("Lucida Sans Typewriter.12 Bold"      "-*-Lucida Sans Typewriter-semibold-r-*-*-16-*-*-*-c-*-iso8859-1"))    ("Courier"     ("Courier 10x8"      "-*-Courier-*normal-r-*-*-*-97-*-*-c-80-iso8859-1")     ("Courier 12x9"      "-*-Courier-*normal-r-*-*-*-120-*-*-c-90-iso8859-1")     ("Courier 15x12"      "-*-Courier-*normal-r-*-*-*-150-*-*-c-120-iso8859-1")     ;; For these, we specify the point height.     ("")     ("8" "-*-Courier New-normal-r-*-*-11-*-*-*-c-*-iso8859-1")     ("9" "-*-Courier New-normal-r-*-*-12-*-*-*-c-*-iso8859-1")     ("10" "-*-Courier New-normal-r-*-*-13-*-*-*-c-*-iso8859-1")     ("11" "-*-Courier New-normal-r-*-*-15-*-*-*-c-*-iso8859-1")     ("12" "-*-Courier New-normal-r-*-*-16-*-*-*-c-*-iso8859-1")     ("8 bold" "-*-Courier New-bold-r-*-*-11-*-*-*-c-*-iso8859-1")     ("9 bold" "-*-Courier New-bold-r-*-*-12-*-*-*-c-*-iso8859-1")     ("10 bold" "-*-Courier New-bold-r-*-*-13-*-*-*-c-*-iso8859-1")     ("11 bold" "-*-Courier New-bold-r-*-*-15-*-*-*-c-*-iso8859-1")     ("12 bold" "-*-Courier New-bold-r-*-*-16-*-*-*-c-*-iso8859-1")     ("8 italic" "-*-Courier New-normal-i-*-*-11-*-*-*-c-*-iso8859-1")     ("9 italic" "-*-Courier New-normal-i-*-*-12-*-*-*-c-*-iso8859-1")     ("10 italic" "-*-Courier New-normal-i-*-*-13-*-*-*-c-*-iso8859-1")     ("11 italic" "-*-Courier New-normal-i-*-*-15-*-*-*-c-*-iso8859-1")     ("12 italic" "-*-Courier New-normal-i-*-*-16-*-*-*-c-*-iso8859-1")     ("8 bold italic" "-*-Courier New-bold-i-*-*-11-*-*-*-c-*-iso8859-1")     ("9 bold italic" "-*-Courier New-bold-i-*-*-12-*-*-*-c-*-iso8859-1")     ("10 bold italic" "-*-Courier New-bold-i-*-*-13-*-*-*-c-*-iso8859-1")     ("11 bold italic" "-*-Courier New-bold-i-*-*-15-*-*-*-c-*-iso8859-1")     ("12 bold italic" "-*-Courier New-bold-i-*-*-16-*-*-*-c-*-iso8859-1")     ))    "Fonts suitable for use in Emacs.Initially this is a list of some fixed width fonts that most peoplewill have like Terminal and Courier. These fonts are used in the fontmenu if the variable `w32-use-w32-font-dialog' is nil.");;; Enable Japanese fonts on Windows to be used by default.(set-fontset-font t (make-char 'katakana-jisx0201) '("*" . "JISX0208-SJIS"))(set-fontset-font t (make-char 'latin-jisx0201) '("*" . "JISX0208-SJIS"))(set-fontset-font t (make-char 'japanese-jisx0208) '("*" . "JISX0208-SJIS"))(set-fontset-font t (make-char 'japanese-jisx0208-1978) '("*" . "JISX0208-SJIS"))(defun mouse-set-font (&rest fonts)  "Select a font.If `w32-use-w32-font-dialog' is non-nil (the default), use the Windowsfont dialog to get the matching FONTS. Otherwise use a pop-up menu\(like Emacs on other platforms) initialized with the fonts in`w32-fixed-font-alist'."  (interactive   (if w32-use-w32-font-dialog       (let ((chosen-font (w32-select-font)))	 (and chosen-font (list chosen-font)))     (x-popup-menu      last-nonmenu-event    ;; Append list of fontsets currently defined.      (if (fboundp 'new-fontset)      (append w32-fixed-font-alist (list (generate-fontset-menu)))))))  (if fonts      (let (font)	(while fonts	  (condition-case nil	      (progn                (setq font (car fonts))		(set-default-font font)                (setq fonts nil))	    (error (setq fonts (cdr fonts)))))	(if (null font)	    (error "Font not found")))));;; w32-win.el ends here

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -