Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
t evaluates to t, so it doesn't need to be quoted
  • Loading branch information
Liam Esteban Prince committed Mar 18, 2019
1 parent 47fe949 commit 54187b4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions elisp.html.markdown
Expand Up @@ -281,7 +281,7 @@ filename: learn-emacs-lisp.el
;; 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 the trick:
;; (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.
Expand All @@ -295,7 +295,7 @@ filename: learn-emacs-lisp.el
(mapcar 'hello list-of-names)
(goto-char (point-min))
;; Replace "Hello" by "Bonjour"
(while (search-forward "Hello" nil 't)
(while (search-forward "Hello" nil t)
(replace-match "Bonjour"))
(other-window 1))

Expand All @@ -306,7 +306,7 @@ filename: learn-emacs-lisp.el
(defun boldify-names ()
(switch-to-buffer-other-window "*test*")
(goto-char (point-min))
(while (re-search-forward "Bonjour \\(.+\\)!" nil 't)
(while (re-search-forward "Bonjour \\(.+\\)!" nil t)
(add-text-properties (match-beginning 1)
(match-end 1)
(list 'face 'bold)))
Expand Down

0 comments on commit 54187b4

Please sign in to comment.