From e06a5d7e0acd8e5c92190da67930118220680346 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Fri, 26 Jul 2013 14:54:49 +0200 Subject: elisp.html.markdown: Fix typos. Thanks to Alan Schmitt for reporting them. --- elisp.html.markdown | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/elisp.html.markdown b/elisp.html.markdown index 87368bc7..b1bd2c47 100644 --- a/elisp.html.markdown +++ b/elisp.html.markdown @@ -6,7 +6,7 @@ filename: learn-emacs-lisp.el --- ```elisp -;; This gives an introduction to Emacs Lisp in 15 minutes (v0.2) +;; This gives an introduction to Emacs Lisp in 15 minutes (v0.2a) ;; ;; First make sure you read this text by Peter Norvig: ;; http://norvig.com/21-days.html @@ -183,7 +183,7 @@ filename: learn-emacs-lisp.el ;; Let's create another function which uses `let': (defun greeting (name) (let ((your-name "Bastien")) - (insert (format "Hello %s!\n\nI'am %s." + (insert (format "Hello %s!\n\nI am %s." name ; the argument of the function your-name ; the let-bound variable "Bastien" )))) @@ -211,7 +211,7 @@ filename: learn-emacs-lisp.el (let ((your-name (read-from-minibuffer "Enter your name: "))) (switch-to-buffer-other-window "*test*") (erase-buffer) - (insert (format "Hello %s!\n\nI'am %s." your-name from-name)) + (insert (format "Hello %s!\n\nI am %s." your-name from-name)) (other-window 1))) ;; Now test it: @@ -273,17 +273,17 @@ filename: learn-emacs-lisp.el ;; replaced by "Bonjour". ;; You should also get an error: "Search failed: Hello". -;; You need to tell search-forward whether it should stop searching -;; at some point in the buffer, and whether it should silently fail -;; when nothing is found: +;; +;; To avoid this error, you need to tell `search-forward' whether it +;; should stop searching at some point in the buffer, and whether it +;; should silently fail when nothing is found: -;; (search-forward "Hello" nil t) does it. +;; (search-forward "Hello" nil t) does the trick: ;; The `nil' argument says: the search is not bound to a position. - ;; The `t' argument says: silently fail when nothing is found. -;; We do it here, in a new function that also says "Hello first": +;; We use this sexp in the function below, which don't throw an error: (defun hello-to-bonjour () (switch-to-buffer-other-window "*test*") @@ -345,4 +345,5 @@ filename: learn-emacs-lisp.el ;; - notbob ;; - Kevin Montuori ;; - Arne Babenhauserheide +;; - Alan Schmitt ``` -- cgit v1.2.3