summaryrefslogtreecommitdiff
path: root/doc/lispintro
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2009-07-28 15:08:17 +0000
committerChong Yidong <cyd@stupidchicken.com>2009-07-28 15:08:17 +0000
commit6dd2819379e67525477f8fe1b53001edec57425c (patch)
tree85fc2a5c2771249421247c500b19f1a582104656 /doc/lispintro
parent76e1446450645771b931de0f566270bf4fbc0264 (diff)
downloademacs-6dd2819379e67525477f8fe1b53001edec57425c.tar.gz
* emacs-lisp-intro.texi (Simple Extension): Bump emacs versions in
examples.
Diffstat (limited to 'doc/lispintro')
-rw-r--r--doc/lispintro/ChangeLog5
-rw-r--r--doc/lispintro/emacs-lisp-intro.texi66
2 files changed, 30 insertions, 41 deletions
diff --git a/doc/lispintro/ChangeLog b/doc/lispintro/ChangeLog
index b823e3f8768..443f819b1dc 100644
--- a/doc/lispintro/ChangeLog
+++ b/doc/lispintro/ChangeLog
@@ -1,3 +1,8 @@
+2009-07-28 Chong Yidong <cyd@stupidchicken.com>
+
+ * emacs-lisp-intro.texi (Simple Extension): Bump emacs versions in
+ examples.
+
2009-07-10 Glenn Morris <rgm@gnu.org>
* emacs-lisp-intro.texi (Top): Add missing @detailmenu entry.
diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi
index 8f4dae544e6..fbf1719b678 100644
--- a/doc/lispintro/emacs-lisp-intro.texi
+++ b/doc/lispintro/emacs-lisp-intro.texi
@@ -17921,18 +17921,18 @@ Your Init File, emacs, The GNU Emacs Manual}.
@cindex Conditional 'twixt two versions of Emacs
@cindex Version of Emacs, choosing
@cindex Emacs version, choosing
-If you run two versions of GNU Emacs, such as versions 21 and 22, and
+If you run two versions of GNU Emacs, such as versions 22 and 23, and
use one @file{.emacs} file, you can select which code to evaluate with
the following conditional:
@smallexample
@group
(cond
- (= 21 emacs-major-version)
- ;; evaluate version 21 code
- ( @dots{} ))
- (= 22 emacs-major-version)
+ ((= 22 emacs-major-version)
;; evaluate version 22 code
+ ( @dots{} ))
+ ((= 23 emacs-major-version)
+ ;; evaluate version 23 code
( @dots{} )))
@end group
@end smallexample
@@ -17954,53 +17954,37 @@ emacs -Q - D
@smallexample
@group
-(when (or (= 21 emacs-major-version)
- (= 22 emacs-major-version))
- (blink-cursor-mode 0)
- ;; Insert newline when you press `C-n' (next-line)
- ;; at the end of the buffer
- (setq next-line-add-newlines t)
-@end group
-@group
- ;; Turn on image viewing
- (auto-image-file-mode t)
+(when (>= emacs-major-version 21)
+ (blink-cursor-mode 0)
+ ;; Insert newline when you press `C-n' (next-line)
+ ;; at the end of the buffer
+ (setq next-line-add-newlines t)
@end group
@group
- ;; Turn on menu bar (this bar has text)
- ;; (Use numeric argument to turn on)
- (menu-bar-mode 1)
+ ;; Turn on image viewing
+ (auto-image-file-mode t)
@end group
@group
- ;; Turn off tool bar (this bar has icons)
- ;; (Use numeric argument to turn on)
- (tool-bar-mode nil)
+ ;; Turn on menu bar (this bar has text)
+ ;; (Use numeric argument to turn on)
+ (menu-bar-mode 1)
@end group
@group
- ;; Turn off tooltip mode for tool bar
- ;; (This mode causes icon explanations to pop up)
- ;; (Use numeric argument to turn on)
- (tooltip-mode nil)
- ;; If tooltips turned on, make tips appear promptly
- (setq tooltip-delay 0.1) ; default is 0.7 second
- )
+ ;; Turn off tool bar (this bar has icons)
+ ;; (Use numeric argument to turn on)
+ (tool-bar-mode nil)
@end group
-@end smallexample
-
-@need 1250
-Alternatively, since @code{blink-cursor-mode} has existed since Emacs
-version 21 and is likely to continue, you could write
-
-@smallexample
@group
-(when (>= emacs-major-version 21)
- (blink-cursor-mode 0)
+ ;; Turn off tooltip mode for tool bar
+ ;; (This mode causes icon explanations to pop up)
+ ;; (Use numeric argument to turn on)
+ (tooltip-mode nil)
+ ;; If tooltips turned on, make tips appear promptly
+ (setq tooltip-delay 0.1) ; default is 0.7 second
+ )
@end group
@end smallexample
-@noindent
-and add other expressions, too.
-
-
@node X11 Colors, Miscellaneous, Simple Extension, Emacs Initialization
@section X11 Colors