📄 onews.4
字号:
This function returns a list of keys (strings) whose definitions(in the LOCAL-KEYMAP or the current global map) are DEFINITION.If FIRST-ONLY is non-nil, it returns a single key (string).This function has changed incompatibly in that now two argumentsare required when previously only one argument was allowed. To getthe old behavior of this function, write `(current-local-map)' asthe expression for the second argument.The incompatibility is sad, but `nil' is a legitimate value for thesecond argument (it means there is no local keymap), so it cannot alsoserve as a default meaning to use the current local keymap.* Abbrevs with hooks.When an abbrev defined with a hook is expanded, it now performs theusual replacement of the abbrev with the expansion before running thehook. Previously the abbrev itself was deleted but the expansion wasnot inserted.* Function `scan-buffer' deleted.Use `search-forward' or `search-backward' in place of `scan-buffer'.You will have to rearrange the arguments.* X window interface improvements.** Detect release of mouse buttons.Button-up events can now be detected. See the file `lisp/x-mouse.el'for details.** New pop-up menu facility.The new function `x-popup-menu' pops up a menu (in a X window)and returns an indication of which selection the user made.For more information, see its self-documentation.* M-x disassemble.This command prints the disassembly of a byte-compiled Emacs Lisp function.Would anyone like to interface this to the debugger?* `insert-buffer-substring' can insert part of the current buffer.The old restriction that the text being inserted had to come froma different buffer is now lifted.When inserting text from the current buffer, the text to be insertedis determined from the specified bounds before any copying takes place.* New function `substitute-key-definition'.This is a new way to replace one command with another command as thebinding of whatever keys may happen to refer to it.(substitute-key-definition OLDDEF NEWDEF KEYMAP) looks through KEYMAPfor keys defined to run OLDDEF, and rebinds those keys to run NEWDEFinstead.* New function `insert-char'.Insert a specified character, a specified number of times.* `mark-marker' changed.When there is no mark, this now returns a marker that pointsnowhere, rather than `nil'.* `ding' accepts argument.When given an argument, the function `ding' does not terminateexecution of a keyboard macro. Normally, `ding' does terminateall macros that are currently executing.* New function `minibuffer-depth'.This function returns the current depth in minibuffer activations.The value is zero when the minibuffer is not in use.Values greater than one are possible if the user has entered theminibuffer recursively.* New function `documentation-property'.(documentation-property SYMBOL PROPNAME) is like (get SYMBOL PROPNAME),except that if the property value is a number `documentation-property'will take that number (or its absolute value) as a character positionin the DOC file and return the string found there.(documentation-property VAR 'variable-documentation) is the properway for a Lisp program to get the documentation of variable VAR.* New documentation-string expansion feature.If a documentation string (for a variable or function) contains textof the form `\<FOO>', it means that all command names specified in`\[COMMAND]' construct from that point on should be turned into keysusing the value of the variable FOO as the local keymap. Thus, for example, `\<emacs-lisp-mode-map>\[eval-defun] evaluates the defun containing point.'will expand into "ESC C-x evaluates the defun containing point."regardless of the current major mode, because ESC C-x is defined torun `eval-defun' in the keymap `emacs-lisp-mode-map'. The effect isto show the key for `eval-defun' in Emacs Lisp mode regardless of thecurrent major mode.The `\<...>' construct applies to all `\[...]' constructs that follow it,up to the end of the documentation string or the next `\<...>'.Without `\<...>', the keys for commands specified in `\[...]' are foundin the current buffer's local map.The current global keymap is always searched second, whether `\<...>'has been used or not.* Multiple hooks allowed in certain contexts.The old hook variables `find-file-hook', `find-file-not-found-hook' and`write-file-hook' have been replaced.The replacements are `find-file-hooks', `find-file-not-found-hooks'and `write-file-hooks'. Each holds a list of functions to be called;by default, `nil', for no functions. The functions are called inorder of appearance in the list.In the case of `find-file-hooks', all the functions are executed.In the case of `find-file-not-found-hooks', if any of the functionsreturns non-`nil', the rest of the functions are not called.In the case of `write-file-hooks', if any of the functions returnsnon-`nil', the rest of the functions are not called, and the file isconsidered to have been written already; so actual writing in theusual way is not done. If `write-file-hooks' is local to a buffer,it is set to its global value if `set-visited-file-name' is called(and thus by C-x C-w as well).`find-file-not-found-hooks' and `write-file-hooks' can be usedtogether to implement editing of files that are not stored as Unixfiles: stored in archives, or inside version control systems, or onother machines running other operating systems and accessible via ftp.* New hooks for suspending Emacs.Suspending Emacs runs the hook `suspend-hook' before suspendingand the hook `suspend-resume-hook' if the suspended Emacs is resumed.Running a hook is done by applying the variable's value to no argumentsif the variable has a non-`nil' value. If `suspend-hook' returnsnon-`nil', then suspending is inhibited and so is running the`suspend-resume-hook'. The non-`nil' value means that the `suspend-hook'has done whatever suspending is required.* Disabling commands can print a special message.A command is disabled by giving it a non-`nil' `disabled' property.Now, if this property is a string, it is included in the messageprinted when the user tries to run the command.* Emacs can open TCP connections.The function `open-network-stream' opens a TCP connection toa specified host and service. Its value is a Lisp object that representsthe connection. The object is a kind of "subprocess", and I/O aredone like I/O to subprocesses.* Display-related changes.** New mode-line control features.The display of the mode line used to be controlled by a format-stringthat was the value of the variable `mode-line-format'.This variable still exists, but it now allows more general values,not just strings. Lists, cons cells and symbols are also meaningful.The mode line contents are created by outputting various mode elementsone after the other. Here are the kinds of objects that can beused as mode elements, and what they do in the display: string the contents of the string are output to the mode line, and %-constructs are replaced by other text. t or nil ignored; no output results. symbol the symbol's value is used. If the value is a string, the string is output verbatim to the mode line (so %-constructs are not interpreted). Otherwise, the symbol's value is processed as a mode element. list (whose first element is a string or list or cons cell) the elements of the list are treated as as mode elements, so that the output they generate is concatenated, list (whose car is a symbol) if the symbol's value is non-nil, the second element of the list is treated as a mode element. Otherwise, the third element (if any) of the list is treated as a mode element. cons (whose car is a positive integer) the cdr of the cons is used as a mode element, but the text it produces is padded, if necessary, to have at least the width specified by the integer. cons (whose car is a negative integer) the cdr of the cons is used as a mode element, but the text it produces is truncated, if necessary, to have at most the width specified by the integer.There is always one mode element to start with, that being the value of`mode-line-format', but if this value is a list then it leads to severalmore mode elements, which can lead to more, and so on.There is one new %-construct for mode elements that are strings:`%n' displays ` Narrow' for a buffer that is narrowed.The default value of `mode-line-format' refers to several other variables.These variables are `mode-name', `mode-line-buffer-identification',`mode-line-process', `mode-line-modified', `global-mode-string' and`minor-mode-alist'. The first four are local in every buffer in which theyare changed from the default.mode-name Name of buffer's major mode. Local in every buffer.mode-line-buffer-identification Normally the list ("Emacs: %17b"), it is responsible for displaying text to indicate what buffer is being shown and what kind of editing it is doing. `Emacs' means that a file of characters is being edited. Major modes such as Info and Dired which edit or view other kinds of data often change this value. This variables becomes local to the current buffer if it is setq'd.mode-line-process Normally nil, this variable is responsible for displaying information about the process running in the current buffer. M-x shell-mode and M-x compile alter this variable.mode-line-modified This variable is responsible for displaying the indication of whether the current buffer is modified or read-only. By default its value is `("--%*%*-")'.minor-mode-alist This variable is responsible for displaying text for those minor modes that are currently enabled. Its value is a list of elements of the form (VARIABLE STRING), where STRING is to be displayed if VARIABLE's value (in the buffer whose mode line is being displayed) is non-nil. This variable is not made local to particular buffers, but loading some libraries may add elements to it.global-mode-string This variable is used to display the time, if you ask for that.The idea of these variables is to eliminate the need for major modesto alter mode-line-format itself.** `window-point' valid for selected window.The value returned by `window-point' used to be incorrect when itsargument was the selected window. Now the value is correct.** Window configurations may be saved as Lisp objects.The function `current-window-configuration' returns a special type ofLisp object that represents the current layout of windows: thesizes and positions of windows, which buffers appear in them, andwhich parts of the buffers appear on the screen.The function `set-window-configuration' takes one argument, which mustbe a window configuration object, and restores that configuration.** New hook `temp-output-buffer-show-hook'.This hook allows you to control how help buffers are displayed.Whenever `with-output-to-temp-buffer' has executed its body and wantsto display the temp buffer, if this variable is bound and non-`nil'then its value is called with one argument, the temp buffer.The hook function is solely responsible for displaying the buffer.The standard manner of display--making the buffer appear in a window--isused only if there is no hook function.** New function `minibuffer-window'.This function returns the window used (sometimes) for displayingthe minibuffer. It can be used even when the minibuffer is not active.** New feature to `next-window'.If the optional second argument is neither `nil' nor `t', the minibufferwindow is omitted from consideration even when active; if the startingwindow was the last non-minibuffer window, the value will be the firstnon-minibuffer window.** New variable `minibuffer-scroll-window'.When this variable is non-`nil', the command `scroll-other-window'uses it as the window to be scrolled. Displays of completion-listsset this variable to the window containing the display.** New argument to `sit-for'.A non-nil second argument to `sit-for' means do not redisplay;just wait for the specified time or until input is available.** Deleted function `set-minor-mode'; minor modes must be changed.The function `set-minor-mode' has been eliminated. The displayof minor mode names in the mode line is now controlled by thevariable `minor-mode-alist'. To specify display of a new minormode, it is sufficient to add an element to this list. Once thatis done, you can turn the mode on and off just by setting a variable,and the display will show its status automatically.** New variable `cursor-in-echo-area'.If this variable is non-nil, the screen cursor appears on thelast line of the screen, at the end of the text displayed there.Binding this variable to t is useful at times when reading singlecharacters of input with `read-char'.** New per-buffer variable `selective-display-ellipses'.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -