diff options
| author | Richard M. Stallman | 2005-02-27 00:16:41 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-02-27 00:16:41 +0000 |
| commit | 378d0f8e9027563fd667e90ae6d8f19a3576615d (patch) | |
| tree | 967e472ff4913e5690ee6002e75466a8ebd4fa41 | |
| parent | 8a2f014e40fa63d17cf48e3d56faa01c14f7df0a (diff) | |
| download | emacs-378d0f8e9027563fd667e90ae6d8f19a3576615d.tar.gz emacs-378d0f8e9027563fd667e90ae6d8f19a3576615d.zip | |
(Coding Conventions): Clarify.
Put all the major mode key reservations together.
Mention the Mouse-1 => Mouse-2 conventions.
| -rw-r--r-- | lispref/ChangeLog | 63 | ||||
| -rw-r--r-- | lispref/tips.texi | 44 |
2 files changed, 84 insertions, 23 deletions
diff --git a/lispref/ChangeLog b/lispref/ChangeLog index e7f05587e71..de0294cffa9 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog | |||
| @@ -1,3 +1,66 @@ | |||
| 1 | 2005-02-26 Richard M. Stallman <rms@gnu.org> | ||
| 2 | |||
| 3 | * tips.texi (Coding Conventions): Clarify. | ||
| 4 | Put all the major mode key reservations together. | ||
| 5 | Mention the Mouse-1 => Mouse-2 conventions. | ||
| 6 | |||
| 7 | * syntax.texi (Syntax Class Table): Clarify. | ||
| 8 | (Syntax Table Functions): syntax-after moved from here. | ||
| 9 | (Syntax Table Internals): syntax-after moved to here. | ||
| 10 | (Parsing Expressions): Update info on number of values | ||
| 11 | and what's meaningful in the STATE argument. | ||
| 12 | (Categories): Fix typo. | ||
| 13 | |||
| 14 | * sequences.texi (Arrays): Cleanup. | ||
| 15 | (Char-Tables): Clarify. | ||
| 16 | |||
| 17 | * processes.texi (Deleting Processes): Cleanups, add xref. | ||
| 18 | (Subprocess Creation): Explain nil in exec-path. Cleanup. | ||
| 19 | (Process Information): set-process-coding-system, some args optional. | ||
| 20 | (Input to Processes): Explain various types for PROCESS args. | ||
| 21 | Rename them from PROCESS-NAME to PROCESS. | ||
| 22 | (Signals to Processes): Likewise. | ||
| 23 | (Decoding Output): Cleanup. | ||
| 24 | (Query Before Exit): Clarify. | ||
| 25 | |||
| 26 | * os.texi (Startup Summary): Correct the options; add missing ones. | ||
| 27 | (Terminal Output, Batch Mode): Clarify. | ||
| 28 | (Flow Control): Node deleted. | ||
| 29 | |||
| 30 | * markers.texi (The Mark): Clarify. | ||
| 31 | |||
| 32 | * macros.texi (Expansion): Cleanup. | ||
| 33 | (Indenting Macros): indent-spec allows ints, not floats. | ||
| 34 | |||
| 35 | * keymaps.texi (Keymaps): Clarify. | ||
| 36 | (Format of Keymaps): Update lisp-mode-map example. | ||
| 37 | (Active Keymaps, Key Lookup): Clarify. | ||
| 38 | (Changing Key Bindings): Add xref to `kbd'. | ||
| 39 | (Key Binding Commands, Simple Menu Items): Clarify. | ||
| 40 | (Mouse Menus, Menu Bar): Clarify. | ||
| 41 | (Menu Example): Replace print example with menu-bar-replace-menu. | ||
| 42 | |||
| 43 | * help.texi (Documentation Basics): Add function-documentation prop. | ||
| 44 | |||
| 45 | * elisp.texi (Top): Don't refer to Flow Control node. | ||
| 46 | |||
| 47 | * commands.texi (Command Overview): Improve xrefs. | ||
| 48 | (Adjusting Point): Adjusting point applies to intangible and invis. | ||
| 49 | (Key Sequence Input): Doc extra read-key-sequence args. | ||
| 50 | Likewise for read-key-sequence-vector. | ||
| 51 | |||
| 52 | * backups.texi (Rename or Copy): Minor fix. | ||
| 53 | (Numbered Backups): For version-control, say the default. | ||
| 54 | (Auto-Saving): make-auto-save-file-name example is simplified. | ||
| 55 | |||
| 56 | * advice.texi (Advising Functions): Don't imply one part of Emacs | ||
| 57 | should advise another part. Markup changes. | ||
| 58 | (Defining Advice): Move transitional para. | ||
| 59 | (Activation of Advice): Cleanup. | ||
| 60 | Explain if COMPILE is nil or negative. | ||
| 61 | |||
| 62 | * abbrevs.texi (Abbrev Expansion): Clarify, fix typo. | ||
| 63 | |||
| 1 | 2005-02-24 Lute Kamstra <lute@gnu.org> | 64 | 2005-02-24 Lute Kamstra <lute@gnu.org> |
| 2 | 65 | ||
| 3 | * modes.texi (Defining Minor Modes): Explain that INIT-VALUE, | 66 | * modes.texi (Defining Minor Modes): Explain that INIT-VALUE, |
diff --git a/lispref/tips.texi b/lispref/tips.texi index 8d7fd5ec5fb..c029ee1d451 100644 --- a/lispref/tips.texi +++ b/lispref/tips.texi | |||
| @@ -46,7 +46,7 @@ variables, constants, and functions in your program with the chosen | |||
| 46 | prefix. This helps avoid name conflicts. | 46 | prefix. This helps avoid name conflicts. |
| 47 | 47 | ||
| 48 | This recommendation applies even to names for traditional Lisp | 48 | This recommendation applies even to names for traditional Lisp |
| 49 | primitives that are not primitives in Emacs Lisp---even to | 49 | primitives that are not primitives in Emacs Lisp---such as |
| 50 | @code{copy-list}. Believe it or not, there is more than one plausible | 50 | @code{copy-list}. Believe it or not, there is more than one plausible |
| 51 | way to define @code{copy-list}. Play it safe; append your name prefix | 51 | way to define @code{copy-list}. Play it safe; append your name prefix |
| 52 | to produce a name like @code{foo-copy-list} or @code{mylib-copy-list} | 52 | to produce a name like @code{foo-copy-list} or @code{mylib-copy-list} |
| @@ -101,11 +101,7 @@ standard Emacs namespace. If your package loads @code{cl} at run time, | |||
| 101 | that could cause name clashes for users who don't use that package. | 101 | that could cause name clashes for users who don't use that package. |
| 102 | 102 | ||
| 103 | However, there is no problem with using the @code{cl} package at compile | 103 | However, there is no problem with using the @code{cl} package at compile |
| 104 | time, for the sake of macros. You do that like this: | 104 | time, with @code{(eval-when-compile (require 'cl))}. |
| 105 | |||
| 106 | @example | ||
| 107 | (eval-when-compile (require 'cl)) | ||
| 108 | @end example | ||
| 109 | 105 | ||
| 110 | @item | 106 | @item |
| 111 | When defining a major mode, please follow the major mode | 107 | When defining a major mode, please follow the major mode |
| @@ -134,16 +130,26 @@ follow the naming conventions for hooks. @xref{Hooks}. | |||
| 134 | @item | 130 | @item |
| 135 | @cindex reserved keys | 131 | @cindex reserved keys |
| 136 | @cindex keys, reserved | 132 | @cindex keys, reserved |
| 137 | Please do not define @kbd{C-c @var{letter}} as a key in your major | 133 | Please do not define @kbd{C-c @var{letter}} as a key in Lisp programs. |
| 138 | modes. Sequences consisting of @kbd{C-c} and a letter (either upper | 134 | Sequences consisting of @kbd{C-c} and a letter (either upper or lower |
| 139 | or lower case) are reserved for users; they are the @strong{only} | 135 | case) are reserved for users; they are the @strong{only} sequences |
| 140 | sequences reserved for users, so do not block them. | 136 | reserved for users, so do not block them. |
| 141 | 137 | ||
| 142 | Changing all the Emacs major modes to respect this convention was a | 138 | Changing all the Emacs major modes to respect this convention was a |
| 143 | lot of work; abandoning this convention would make that work go to | 139 | lot of work; abandoning this convention would make that work go to |
| 144 | waste, and inconvenience users. Please comply with it. | 140 | waste, and inconvenience users. Please comply with it. |
| 145 | 141 | ||
| 146 | @item | 142 | @item |
| 143 | Function keys @key{F5} through @key{F9} without modifier keys are | ||
| 144 | also reserved for users to define. | ||
| 145 | |||
| 146 | @item | ||
| 147 | Applications should not bind mouse events based on button 1 with the | ||
| 148 | shift key held down. These events include @kbd{S-mouse-1}, | ||
| 149 | @kbd{M-S-mouse-1}, @kbd{C-S-mouse-1}, and so on. They are reserved for | ||
| 150 | users. | ||
| 151 | |||
| 152 | @item | ||
| 147 | Sequences consisting of @kbd{C-c} followed by a control character or a | 153 | Sequences consisting of @kbd{C-c} followed by a control character or a |
| 148 | digit are reserved for major modes. | 154 | digit are reserved for major modes. |
| 149 | 155 | ||
| @@ -158,10 +164,6 @@ not absolutely prohibited, but if you do that, the major mode binding | |||
| 158 | may be shadowed from time to time by minor modes. | 164 | may be shadowed from time to time by minor modes. |
| 159 | 165 | ||
| 160 | @item | 166 | @item |
| 161 | Function keys @key{F5} through @key{F9} without modifier keys are | ||
| 162 | reserved for users to define. | ||
| 163 | |||
| 164 | @item | ||
| 165 | Do not bind @kbd{C-h} following any prefix character (including | 167 | Do not bind @kbd{C-h} following any prefix character (including |
| 166 | @kbd{C-c}). If you don't bind @kbd{C-h}, it is automatically available | 168 | @kbd{C-c}). If you don't bind @kbd{C-h}, it is automatically available |
| 167 | as a help character for listing the subcommands of the prefix character. | 169 | as a help character for listing the subcommands of the prefix character. |
| @@ -189,12 +191,6 @@ after @key{ESC}. In these states, you should define @kbd{@key{ESC} | |||
| 189 | @kbd{@key{ESC} @key{ESC}} instead. | 191 | @kbd{@key{ESC} @key{ESC}} instead. |
| 190 | 192 | ||
| 191 | @item | 193 | @item |
| 192 | Applications should not bind mouse events based on button 1 with the | ||
| 193 | shift key held down. These events include @kbd{S-mouse-1}, | ||
| 194 | @kbd{M-S-mouse-1}, @kbd{C-S-mouse-1}, and so on. They are reserved for | ||
| 195 | users. | ||
| 196 | |||
| 197 | @item | ||
| 198 | @cindex mouse-2 | 194 | @cindex mouse-2 |
| 199 | @cindex references, following | 195 | @cindex references, following |
| 200 | Special major modes used for read-only text should usually redefine | 196 | Special major modes used for read-only text should usually redefine |
| @@ -202,6 +198,9 @@ Special major modes used for read-only text should usually redefine | |||
| 202 | Modes such as Dired, Info, Compilation, and Occur redefine it in this | 198 | Modes such as Dired, Info, Compilation, and Occur redefine it in this |
| 203 | way. | 199 | way. |
| 204 | 200 | ||
| 201 | In addition, they should mark the text as a kind of ``link'' so that | ||
| 202 | @kbd{mouse-1} will follow it also. @xref{Links and Mouse-1}. | ||
| 203 | |||
| 205 | @item | 204 | @item |
| 206 | When a package provides a modification of ordinary Emacs behavior, it is | 205 | When a package provides a modification of ordinary Emacs behavior, it is |
| 207 | good to include a command to enable and disable the feature, provide a | 206 | good to include a command to enable and disable the feature, provide a |
| @@ -382,8 +381,7 @@ not to warn about uses of the variable @code{foo} in this file. | |||
| 382 | @item | 381 | @item |
| 383 | If you use many functions and variables from a certain file, you can | 382 | If you use many functions and variables from a certain file, you can |
| 384 | add a @code{require} for that package to avoid compilation warnings | 383 | add a @code{require} for that package to avoid compilation warnings |
| 385 | for them. It is better if the @code{require} acts only at compile | 384 | for them. For instance, |
| 386 | time. Here's how to do this: | ||
| 387 | 385 | ||
| 388 | @example | 386 | @example |
| 389 | (eval-when-compile | 387 | (eval-when-compile |
| @@ -434,7 +432,7 @@ Use a message like this one: | |||
| 434 | 432 | ||
| 435 | If you have signed papers to assign the copyright to the Foundation, | 433 | If you have signed papers to assign the copyright to the Foundation, |
| 436 | then use @samp{Free Software Foundation, Inc.} as @var{name}. | 434 | then use @samp{Free Software Foundation, Inc.} as @var{name}. |
| 437 | Otherwise, use your name. | 435 | Otherwise, use your name. See also @xref{Library Headers}. |
| 438 | @end itemize | 436 | @end itemize |
| 439 | 437 | ||
| 440 | @node Compilation Tips | 438 | @node Compilation Tips |