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

📄 info.el

📁 gcc-2.95.3 Linux下最常用的C编译器
💻 EL
📖 第 1 页 / 共 5 页
字号:
		(format "`%s'" (substring name 0 (match-beginning 1)))		nil t))	  (search-forward name nil t))      (beginning-of-line)    (goto-char (point-min))))(defun Info-undefined ()  "Make command be undefined in Info."  (interactive)  (ding))(defun Info-help ()  "Enter the Info tutorial."  (interactive)  (delete-other-windows)  (Info-find-node "info"		  (if (< (window-height) 23)		      "Help-Small-Screen"		    "Help")))(defun Info-summary ()  "Display a brief summary of all Info commands."  (interactive)  (save-window-excursion    (switch-to-buffer "*Help*")    (erase-buffer)    (insert (documentation 'Info-mode))    (help-mode)    (goto-char (point-min))    (let (ch flag)      (while (progn (setq flag (not (pos-visible-in-window-p (point-max))))		    (message (if flag "Type Space to see more"			       "Type Space to return to Info"))		    (if (not (eq ?\  (setq ch (read-event))))			(progn (setq unread-command-events (list ch)) nil)		      flag))	(scroll-up)))    (bury-buffer "*Help*")))(defun Info-get-token (pos start all &optional errorstring)  "Return the token around POS,POS must be somewhere inside the tokenSTART is a regular expression which will match the    beginning of the tokens delimited stringALL is a regular expression with a single    parenthesized subpattern which is the token to be    returned. E.g. '{\(.*\)}' would return any string    enclosed in braces around POS.SIG optional fourth argument, controls action on no match    nil: return nil    t: beep    a string: signal an error, using that string."  (save-excursion    (goto-char pos)    ;; First look for a match for START that goes across POS.    (while (and (not (bobp)) (> (point) (- pos (length start)))		(not (looking-at start)))      (forward-char -1))    ;; If we did not find one, search back for START    ;; (this finds only matches that end at or before POS).    (or (looking-at start)	(progn	  (goto-char pos)	  (re-search-backward start (max (point-min) (- pos 200)) 'yes)))    (let (found)      (while (and (re-search-forward all (min (point-max) (+ pos 200)) 'yes)		  (not (setq found (and (<= (match-beginning 0) pos)					(> (match-end 0) pos))))))      (if (and found (<= (match-beginning 0) pos)	       (> (match-end 0) pos))	  (buffer-substring (match-beginning 1) (match-end 1))	(cond ((null errorstring)	       nil)	      ((eq errorstring t)	       (beep)	       nil)	      (t	       (error "No %s around position %d" errorstring pos)))))))(defun Info-mouse-follow-nearest-node (click)  "\\<Info-mode-map>Follow a node reference near point.Like \\[Info-menu], \\[Info-follow-reference], \\[Info-next], \\[Info-prev] or \\[Info-up] command, depending on where you click.At end of the node's text, moves to the next node, or up if none."  (interactive "e")  (let* ((start (event-start click))	 (window (car start))	 (pos (car (cdr start))))    (select-window window)    (goto-char pos))  (and (not (Info-try-follow-nearest-node))       (save-excursion (forward-line 1) (eobp))       (Info-next-preorder)))(defun Info-follow-nearest-node ()  "\\<Info-mode-map>Follow a node reference near point.Like \\[Info-menu], \\[Info-follow-reference], \\[Info-next], \\[Info-prev] or \\[Info-up] command, depending on where point is.If no reference to follow, moves to the next node, or up if none."  (interactive)  (or (Info-try-follow-nearest-node)      (Info-next-preorder)));; Common subroutine.(defun Info-try-follow-nearest-node ()  "Follow a node reference near point.  Return non-nil if successful."  (let (node)    (cond     ((setq node (Info-get-token (point) "\\*note[ \n]"				 "\\*note[ \n]\\([^:]*\\):"))      (Info-follow-reference node))     ((setq node (Info-get-token (point) "\\* " "\\* \\([^:]*\\)::"))      (Info-goto-node node))     ((setq node (Info-get-token (point) "\\* " "\\* \\([^:]*\\):"))      (Info-menu node))     ((setq node (Info-get-token (point) "Up: " "Up: \\([^,\n\t]*\\)"))      (Info-goto-node node))     ((setq node (Info-get-token (point) "Next: " "Next: \\([^,\n\t]*\\)"))      (Info-goto-node node))     ((setq node (Info-get-token (point) "File: " "File: \\([^,\n\t]*\\)"))      (Info-goto-node "Top"))     ((setq node (Info-get-token (point) "Prev: " "Prev: \\([^,\n\t]*\\)"))      (Info-goto-node node)))    node))(defvar Info-mode-map nil  "Keymap containing Info commands.")(if Info-mode-map    nil  (setq Info-mode-map (make-keymap))  (suppress-keymap Info-mode-map)  (define-key Info-mode-map "." 'beginning-of-buffer)  (define-key Info-mode-map " " 'Info-scroll-up)  (define-key Info-mode-map "\C-m" 'Info-follow-nearest-node)  (define-key Info-mode-map "\t" 'Info-next-reference)  (define-key Info-mode-map "\e\t" 'Info-prev-reference)  (define-key Info-mode-map "1" 'Info-nth-menu-item)  (define-key Info-mode-map "2" 'Info-nth-menu-item)  (define-key Info-mode-map "3" 'Info-nth-menu-item)  (define-key Info-mode-map "4" 'Info-nth-menu-item)  (define-key Info-mode-map "5" 'Info-nth-menu-item)  (define-key Info-mode-map "6" 'Info-nth-menu-item)  (define-key Info-mode-map "7" 'Info-nth-menu-item)  (define-key Info-mode-map "8" 'Info-nth-menu-item)  (define-key Info-mode-map "9" 'Info-nth-menu-item)  (define-key Info-mode-map "0" 'undefined)  (define-key Info-mode-map "?" 'Info-summary)  (define-key Info-mode-map "]" 'Info-forward-node)  (define-key Info-mode-map "[" 'Info-backward-node)  (define-key Info-mode-map "<" 'Info-top-node)  (define-key Info-mode-map ">" 'Info-final-node)  (define-key Info-mode-map "b" 'beginning-of-buffer)  (define-key Info-mode-map "d" 'Info-directory)  (define-key Info-mode-map "e" 'Info-edit)  (define-key Info-mode-map "f" 'Info-follow-reference)  (define-key Info-mode-map "g" 'Info-goto-node)  (define-key Info-mode-map "h" 'Info-help)  (define-key Info-mode-map "i" 'Info-index)  (define-key Info-mode-map "l" 'Info-last)  (define-key Info-mode-map "m" 'Info-menu)  (define-key Info-mode-map "n" 'Info-next)  (define-key Info-mode-map "p" 'Info-prev)  (define-key Info-mode-map "q" 'Info-exit)  (define-key Info-mode-map "s" 'Info-search)  ;; For consistency with Rmail.  (define-key Info-mode-map "\M-s" 'Info-search)  (define-key Info-mode-map "t" 'Info-top-node)  (define-key Info-mode-map "u" 'Info-up)  (define-key Info-mode-map "," 'Info-index-next)  (define-key Info-mode-map "\177" 'Info-scroll-down)  (define-key Info-mode-map [mouse-2] 'Info-mouse-follow-nearest-node)  )(defun Info-check-pointer (item)  ;; Non-nil if ITEM is present in this node.  (condition-case nil      (Info-extract-pointer item)    (error nil)))(easy-menu-define Info-mode-menu Info-mode-map  "Menu for info files."  '("Info"    ["Up" Info-up (Info-check-pointer "up")]    ["Next" Info-next (Info-check-pointer "next")]    ["Previous" Info-prev (Info-check-pointer "prev[ious]*")]    ("Menu item" ["You should never see this" report-emacs-bug t])    ("Reference" ["You should never see this" report-emacs-bug t])    ["Search..." Info-search t]    ["Goto node..." Info-goto-node t]    ["Last" Info-last Info-history]    ["Exit" Info-exit t]))(defvar Info-menu-last-node nil);; Last node the menu was created for.(defun Info-menu-update ()  ;; Update the Info menu for the current node.  (condition-case nil      (if (or (not (eq major-mode 'Info-mode))	      (eq Info-current-node Info-menu-last-node))	  ()	;; Update menu menu.	(let* ((Info-complete-menu-buffer (current-buffer))	       (items (nreverse (condition-case nil				    (Info-complete-menu-item				     "" (lambda (e) t) t)				  (error nil))))	       entries current 	       (number 0))	  (while (and items (< number 9))	    (setq current (car items)		  items (cdr items)		  number (1+ number))	    (setq entries (cons `[,current 				  (Info-menu ,current)				  :keys ,(format "%d" number)]				entries)))	  (if items	      (setq entries (cons ["Other..." Info-menu t] entries)))	  (or entries	      (setq entries (list ["No menu" nil nil])))	  (easy-menu-change '("Info") "Menu item" (nreverse entries)))	;; Update reference menu.  Code stolen from `Info-follow-reference'.	(let ((items nil)	      str i entries current 	      (number 0))	  (save-excursion	    (goto-char (point-min))	    (while (re-search-forward "\\*note[ \n\t]*\\([^:]*\\):" nil t)	      (setq str (buffer-substring			 (match-beginning 1)			 (1- (point))))	      (setq i 0)	      (while (setq i (string-match "[ \n\t]+" str i))		(setq str (concat (substring str 0 i) " "				  (substring str (match-end 0))))		(setq i (1+ i)))	      (setq items		    (cons str items))))	  (while (and items (< number 9))	    (setq current (car items)		  items (cdr items)		  number (1+ number))	    (setq entries (cons `[,current 				  (Info-follow-reference ,current)				  t]				entries)))	  (if items	      (setq entries (cons ["Other..." Info-follow-reference t]				  entries)))	  (or entries	      (setq entries (list ["No references" nil nil])))	  (easy-menu-change '("Info") "Reference" (nreverse entries)))	;; Update last seen node.	(setq Info-menu-last-node (current-buffer)))    ;; Try to avoid entering infinite beep mode in case of errors.    (error (ding))));; Info mode is suitable only for specially formatted data.(put 'info-mode 'mode-class 'special)(defun Info-mode ()  "\\<Info-mode-map>Info mode provides commands for browsing through the Info documentation tree.Documentation in Info is divided into \"nodes\", each of which discussesone topic and contains references to other nodes which discuss relatedtopics.  Info has commands to follow the references and show you other nodes.\\[Info-help]	Invoke the Info tutorial.Selecting other nodes:\\[Info-mouse-follow-nearest-node]	Follow a node reference you click on.	  This works with menu items, cross references, and	  the \"next\", \"previous\" and \"up\", depending on where you click.\\[Info-next]	Move to the \"next\" node of this node.\\[Info-prev]	Move to the \"previous\" node of this node.\\[Info-up]	Move \"up\" from this node.\\[Info-menu]	Pick menu item specified by name (or abbreviation).	Picking a menu item causes another node to be selected.\\[Info-directory]	Go to the Info directory node.\\[Info-follow-reference]	Follow a cross reference.  Reads name of reference.\\[Info-last]	Move to the last node you were at.\\[Info-index]	Look up a topic in this file's Index and move to that node.\\[Info-index-next]	(comma) Move to the next match from a previous `i' command.Moving within a node:\\[Info-scroll-up]	Normally, scroll forward a full screen.  If the end of the buffer isalready visible, try to go to the next menu entry, or up if there is none.\\[Info-scroll-down]  Normally, scroll backward.  If the beginning of the buffer isalready visible, try to go to the previous menu entry, or up if there is none.\\[beginning-of-buffer]	Go to beginning of node.  Advanced commands:\\[Info-exit]	Quit Info: reselect previously selected buffer.\\[Info-edit]	Edit contents of selected node.1	Pick first item in node's menu.2, 3, 4, 5   Pick second ... fifth item in node's menu.\\[Info-goto-node]	Move to node specified by name.	You may include a filename as well, as (FILENAME)NODENAME.\\[universal-argument] \\[info]	Move to new Info file with completion.\\[Info-search]	Search through this Info file for specified regexp,	and select the node in which the next occurrence is found.\\[Info-next-reference]	Move cursor to next cross-reference or menu item.\\[Info-prev-reference]	Move cursor to previous cross-reference or menu item."  (kill-all-local-variables)  (setq major-mode 'Info-mode)  (setq mode-name "Info")  (setq tab-width 8)  (use-local-map Info-mode-map)  (make-local-hook 'activate-menubar-hook)  (add-hook 'activate-menubar-hook 'Info-menu-update nil t)  (set-syntax-table text-mode-syntax-table)  (setq local-abbrev-table text-mode-abbrev-table)  (setq case-fold-search t)  (setq buffer-read-only t)  (make-local-variable 'Info-current-file)  (make-local-variable 'Info-current-subfile)  (make-local-variable 'Info-current-node)  (make-local-variable 'Info-tag-table-marker)  (setq Info-tag-table-marker (make-marker))  (make-local-variable 'Info-tag-table-buffer)  (setq Info-tag-table-buffer nil)  (make-local-variable 'Info-history)  (make-local-variable 'Info-index-alternatives)  (if (memq (framep (selected-frame)) '(x pc w32))      (progn	(make-face 'info-node)	(make-face 'info-menu-5)	(make-face 'info-xref)	(or (face-differs-from-default-p 'info-node)	    (if (face-differs-from-default-p 'bold-italic)		(copy-face 'bold-italic 'info-node)	      (copy-face 'bold 'info-node)))	(or (face-differs-from-default-p 'info-menu-5)	    (set-face-underline-p 'info-menu-5 t))	(or (face-differs-from-default-p 'info-xref)	    (copy-face 'bold 'info-xref)))    (setq Info-fontify nil))  (Info-set-mode-line)  (run-hooks 'Info-mode-hook))(defvar Info-edit-map nil  "Local keymap used within `e' command of Info.")(if Info-edit-map    nil  (setq Info-edit-map (nconc (make-sparse-keymap) text-mode-map))  (define-key Info-edit-map "\C-c\C-c" 'Info-cease-edit));; Info-edit mode is suitable only for specially formatted data.(put 'info-edit-mode 'mode-class 'special)(defun Info-edit-mode ()  "Major mode for editing the contents of an Info node.Like text mode with the addition of `Info-cease-edit'which returns to Info mode for browsing.\\{Info-edit-map}"  (use-local-map Info-edit-map)  (setq major-mode 'Info-edit-mode)  (setq mode-name "Info Edit")  (kill-local-variable 'mode-line-buffer-identification)  (setq buffer-read-only nil)  (force-mode-li

⌨️ 快捷键说明

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