aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2005-02-27 00:16:41 +0000
committerRichard M. Stallman2005-02-27 00:16:41 +0000
commit378d0f8e9027563fd667e90ae6d8f19a3576615d (patch)
tree967e472ff4913e5690ee6002e75466a8ebd4fa41
parent8a2f014e40fa63d17cf48e3d56faa01c14f7df0a (diff)
downloademacs-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/ChangeLog63
-rw-r--r--lispref/tips.texi44
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 @@
12005-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
12005-02-24 Lute Kamstra <lute@gnu.org> 642005-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
46prefix. This helps avoid name conflicts. 46prefix. This helps avoid name conflicts.
47 47
48This recommendation applies even to names for traditional Lisp 48This recommendation applies even to names for traditional Lisp
49primitives that are not primitives in Emacs Lisp---even to 49primitives 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
51way to define @code{copy-list}. Play it safe; append your name prefix 51way to define @code{copy-list}. Play it safe; append your name prefix
52to produce a name like @code{foo-copy-list} or @code{mylib-copy-list} 52to 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,
101that could cause name clashes for users who don't use that package. 101that could cause name clashes for users who don't use that package.
102 102
103However, there is no problem with using the @code{cl} package at compile 103However, there is no problem with using the @code{cl} package at compile
104time, for the sake of macros. You do that like this: 104time, 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
111When defining a major mode, please follow the major mode 107When 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
137Please do not define @kbd{C-c @var{letter}} as a key in your major 133Please do not define @kbd{C-c @var{letter}} as a key in Lisp programs.
138modes. Sequences consisting of @kbd{C-c} and a letter (either upper 134Sequences consisting of @kbd{C-c} and a letter (either upper or lower
139or lower case) are reserved for users; they are the @strong{only} 135case) are reserved for users; they are the @strong{only} sequences
140sequences reserved for users, so do not block them. 136reserved for users, so do not block them.
141 137
142Changing all the Emacs major modes to respect this convention was a 138Changing all the Emacs major modes to respect this convention was a
143lot of work; abandoning this convention would make that work go to 139lot of work; abandoning this convention would make that work go to
144waste, and inconvenience users. Please comply with it. 140waste, and inconvenience users. Please comply with it.
145 141
146@item 142@item
143Function keys @key{F5} through @key{F9} without modifier keys are
144also reserved for users to define.
145
146@item
147Applications should not bind mouse events based on button 1 with the
148shift 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
150users.
151
152@item
147Sequences consisting of @kbd{C-c} followed by a control character or a 153Sequences consisting of @kbd{C-c} followed by a control character or a
148digit are reserved for major modes. 154digit are reserved for major modes.
149 155
@@ -158,10 +164,6 @@ not absolutely prohibited, but if you do that, the major mode binding
158may be shadowed from time to time by minor modes. 164may be shadowed from time to time by minor modes.
159 165
160@item 166@item
161Function keys @key{F5} through @key{F9} without modifier keys are
162reserved for users to define.
163
164@item
165Do not bind @kbd{C-h} following any prefix character (including 167Do 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
167as a help character for listing the subcommands of the prefix character. 169as 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
192Applications should not bind mouse events based on button 1 with the
193shift 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
195users.
196
197@item
198@cindex mouse-2 194@cindex mouse-2
199@cindex references, following 195@cindex references, following
200Special major modes used for read-only text should usually redefine 196Special 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
202Modes such as Dired, Info, Compilation, and Occur redefine it in this 198Modes such as Dired, Info, Compilation, and Occur redefine it in this
203way. 199way.
204 200
201In 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
206When a package provides a modification of ordinary Emacs behavior, it is 205When a package provides a modification of ordinary Emacs behavior, it is
207good to include a command to enable and disable the feature, provide a 206good 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
383If you use many functions and variables from a certain file, you can 382If you use many functions and variables from a certain file, you can
384add a @code{require} for that package to avoid compilation warnings 383add a @code{require} for that package to avoid compilation warnings
385for them. It is better if the @code{require} acts only at compile 384for them. For instance,
386time. 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
435If you have signed papers to assign the copyright to the Foundation, 433If you have signed papers to assign the copyright to the Foundation,
436then use @samp{Free Software Foundation, Inc.} as @var{name}. 434then use @samp{Free Software Foundation, Inc.} as @var{name}.
437Otherwise, use your name. 435Otherwise, use your name. See also @xref{Library Headers}.
438@end itemize 436@end itemize
439 437
440@node Compilation Tips 438@node Compilation Tips