aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorPaul Eggert2015-09-01 17:25:39 -0700
committerPaul Eggert2015-09-01 17:29:47 -0700
commitafe1cf00713847c1d8f3a9d95d4980d705ec39f1 (patch)
treee8a91671a7a48e56629e0874546570309870a400 /doc
parent72aae7326b8e2264eb02e8f9725a367f62aa09fd (diff)
downloademacs-afe1cf00713847c1d8f3a9d95d4980d705ec39f1.tar.gz
emacs-afe1cf00713847c1d8f3a9d95d4980d705ec39f1.zip
Rework quoting in tutorial
* doc/lispintro/emacs-lisp-intro.texi (Sample let Expression) (if in more detail, type-of-animal in detail, else): Rework the early example to use " rather than ' so that we don’t burden complete novices with the low-priority detail of text quoting style. (Complete zap-to-char, kill-region, Complete copy-region-as-kill) (kill-new function, kill-ring-yank-pointer) (Complete forward-sentence, Loading Files) (Code for current-kill, Code for current-kill, yank): Resurrect the Emacs 22 versions of the code, which uses grave quoting style in doc strings. (Complete zap-to-char): Mention how quoting works in doc strings.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispintro/emacs-lisp-intro.texi189
1 files changed, 104 insertions, 85 deletions
diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi
index a27a969f91b..3ac24183078 100644
--- a/doc/lispintro/emacs-lisp-intro.texi
+++ b/doc/lispintro/emacs-lisp-intro.texi
@@ -3691,26 +3691,26 @@ to the two variables @code{zebra} and @code{tiger}. The body of the
3691 3691
3692@smallexample 3692@smallexample
3693@group 3693@group
3694(let ((zebra 'stripes) 3694(let ((zebra "stripes")
3695 (tiger 'fierce)) 3695 (tiger "fierce"))
3696 (message "One kind of animal has %s and another is %s." 3696 (message "One kind of animal has %s and another is %s."
3697 zebra tiger)) 3697 zebra tiger))
3698@end group 3698@end group
3699@end smallexample 3699@end smallexample
3700 3700
3701Here, the varlist is @code{((zebra 'stripes) (tiger 'fierce))}. 3701Here, the varlist is @code{((zebra "stripes") (tiger "fierce"))}.
3702 3702
3703The two variables are @code{zebra} and @code{tiger}. Each variable is 3703The two variables are @code{zebra} and @code{tiger}. Each variable is
3704the first element of a two-element list and each value is the second 3704the first element of a two-element list and each value is the second
3705element of its two-element list. In the varlist, Emacs binds the 3705element of its two-element list. In the varlist, Emacs binds the
3706variable @code{zebra} to the value @code{stripes}@footnote{According 3706variable @code{zebra} to the value @code{"stripes"}@footnote{According
3707to Jared Diamond in @cite{Guns, Germs, and Steel}, ``@dots{} zebras 3707to Jared Diamond in @cite{Guns, Germs, and Steel}, ``@dots{} zebras
3708become impossibly dangerous as they grow older'' but the claim here is 3708become impossibly dangerous as they grow older'' but the claim here is
3709that they do not become fierce like a tiger. (1997, W. W. Norton and 3709that they do not become fierce like a tiger. (1997, W. W. Norton and
3710Co., ISBN 0-393-03894-2, page 171)}, and binds the 3710Co., ISBN 0-393-03894-2, page 171)}, and binds the
3711variable @code{tiger} to the value @code{fierce}. In this example, 3711variable @code{tiger} to the value @code{"fierce"}. In this example,
3712both values are symbols preceded by a quote. The values could just as 3712both values are strings. The values could just as well have been
3713well have been another list or a string. The body of the @code{let} 3713another list or a symbol. The body of the @code{let}
3714follows after the list holding the variables. In this example, the 3714follows after the list holding the variables. In this example, the
3715body is a list that uses the @code{message} function to print a string 3715body is a list that uses the @code{message} function to print a string
3716in the echo area. 3716in the echo area.
@@ -3855,17 +3855,17 @@ of time, we would not need to run the test!)
3855For example, the value may be bound to an argument of a function 3855For example, the value may be bound to an argument of a function
3856definition. In the following function definition, the character of the 3856definition. In the following function definition, the character of the
3857animal is a value that is passed to the function. If the value bound to 3857animal is a value that is passed to the function. If the value bound to
3858@code{characteristic} is @code{fierce}, then the message, @samp{It's a 3858@code{characteristic} is @code{"fierce"}, then the message, @samp{It is a
3859tiger!} will be printed; otherwise, @code{nil} will be returned. 3859tiger!} will be printed; otherwise, @code{nil} will be returned.
3860 3860
3861@smallexample 3861@smallexample
3862@group 3862@group
3863(defun type-of-animal (characteristic) 3863(defun type-of-animal (characteristic)
3864 "Print message in echo area depending on CHARACTERISTIC. 3864 "Print message in echo area depending on CHARACTERISTIC.
3865If the CHARACTERISTIC is the symbol fierce, 3865If the CHARACTERISTIC is the string \"fierce\",
3866then warn of a tiger." 3866then warn of a tiger."
3867 (if (equal characteristic 'fierce) 3867 (if (equal characteristic "fierce")
3868 (message "Its a tiger!"))) 3868 (message "It is a tiger!")))
3869@end group 3869@end group
3870@end smallexample 3870@end smallexample
3871 3871
@@ -3877,18 +3877,18 @@ can evaluate the following two expressions to see the results:
3877 3877
3878@smallexample 3878@smallexample
3879@group 3879@group
3880(type-of-animal 'fierce) 3880(type-of-animal "fierce")
3881 3881
3882(type-of-animal 'zebra) 3882(type-of-animal "striped")
3883 3883
3884@end group 3884@end group
3885@end smallexample 3885@end smallexample
3886 3886
3887@c Following sentences rewritten to prevent overfull hbox. 3887@c Following sentences rewritten to prevent overfull hbox.
3888@noindent 3888@noindent
3889When you evaluate @code{(type-of-animal 'fierce)}, you will see the 3889When you evaluate @code{(type-of-animal "fierce")}, you will see the
3890following message printed in the echo area: @code{"Its a tiger!"}; and 3890following message printed in the echo area: @code{"It is a tiger!"}; and
3891when you evaluate @code{(type-of-animal 'zebra)} you will see @code{nil} 3891when you evaluate @code{(type-of-animal "striped")} you will see @code{nil}
3892printed in the echo area. 3892printed in the echo area.
3893 3893
3894@node type-of-animal in detail 3894@node type-of-animal in detail
@@ -3918,7 +3918,7 @@ The parts of the function that match this template look like this:
3918@group 3918@group
3919(defun type-of-animal (characteristic) 3919(defun type-of-animal (characteristic)
3920 "Print message in echo area depending on CHARACTERISTIC. 3920 "Print message in echo area depending on CHARACTERISTIC.
3921If the CHARACTERISTIC is the symbol fierce, 3921If the CHARACTERISTIC is the string \"fierce\",
3922then warn of a tiger." 3922then warn of a tiger."
3923 @var{body: the} @code{if} @var{expression}) 3923 @var{body: the} @code{if} @var{expression})
3924@end group 3924@end group
@@ -3947,8 +3947,8 @@ looks like this:
3947 3947
3948@smallexample 3948@smallexample
3949@group 3949@group
3950(if (equal characteristic 'fierce) 3950(if (equal characteristic "fierce")
3951 (message "Its a tiger!"))) 3951 (message "It is a tiger!")))
3952@end group 3952@end group
3953@end smallexample 3953@end smallexample
3954 3954
@@ -3956,26 +3956,26 @@ looks like this:
3956Here, the true-or-false-test is the expression: 3956Here, the true-or-false-test is the expression:
3957 3957
3958@smallexample 3958@smallexample
3959(equal characteristic 'fierce) 3959(equal characteristic "fierce")
3960@end smallexample 3960@end smallexample
3961 3961
3962@noindent 3962@noindent
3963In Lisp, @code{equal} is a function that determines whether its first 3963In Lisp, @code{equal} is a function that determines whether its first
3964argument is equal to its second argument. The second argument is the 3964argument is equal to its second argument. The second argument is the
3965quoted symbol @code{'fierce} and the first argument is the value of the 3965string @code{"fierce"} and the first argument is the value of the
3966symbol @code{characteristic}---in other words, the argument passed to 3966symbol @code{characteristic}---in other words, the argument passed to
3967this function. 3967this function.
3968 3968
3969In the first exercise of @code{type-of-animal}, the argument 3969In the first exercise of @code{type-of-animal}, the argument
3970@code{fierce} is passed to @code{type-of-animal}. Since @code{fierce} 3970@code{"fierce"} is passed to @code{type-of-animal}. Since @code{"fierce"}
3971is equal to @code{fierce}, the expression, @code{(equal characteristic 3971is equal to @code{"fierce"}, the expression, @code{(equal characteristic
3972'fierce)}, returns a value of true. When this happens, the @code{if} 3972"fierce")}, returns a value of true. When this happens, the @code{if}
3973evaluates the second argument or then-part of the @code{if}: 3973evaluates the second argument or then-part of the @code{if}:
3974@code{(message "Its a tiger!")}. 3974@code{(message "It is a tiger!")}.
3975 3975
3976On the other hand, in the second exercise of @code{type-of-animal}, the 3976On the other hand, in the second exercise of @code{type-of-animal}, the
3977argument @code{zebra} is passed to @code{type-of-animal}. @code{zebra} 3977argument @code{"striped"} is passed to @code{type-of-animal}. @code{"striped"}
3978is not equal to @code{fierce}, so the then-part is not evaluated and 3978is not equal to @code{"fierce"}, so the then-part is not evaluated and
3979@code{nil} is returned by the @code{if} expression. 3979@code{nil} is returned by the @code{if} expression.
3980 3980
3981@node else 3981@node else
@@ -4034,33 +4034,33 @@ arguments to the function.
4034@group 4034@group
4035(defun type-of-animal (characteristic) ; @r{Second version.} 4035(defun type-of-animal (characteristic) ; @r{Second version.}
4036 "Print message in echo area depending on CHARACTERISTIC. 4036 "Print message in echo area depending on CHARACTERISTIC.
4037If the CHARACTERISTIC is the symbol fierce, 4037If the CHARACTERISTIC is the string \"fierce\",
4038then warn of a tiger; else say its not fierce." 4038then warn of a tiger; else say it is not fierce."
4039 (if (equal characteristic 'fierce) 4039 (if (equal characteristic "fierce")
4040 (message "Its a tiger!") 4040 (message "It is a tiger!")
4041 (message "Its not fierce!"))) 4041 (message "It is not fierce!")))
4042@end group 4042@end group
4043@end smallexample 4043@end smallexample
4044@sp 1 4044@sp 1
4045 4045
4046@smallexample 4046@smallexample
4047@group 4047@group
4048(type-of-animal 'fierce) 4048(type-of-animal "fierce")
4049 4049
4050(type-of-animal 'zebra) 4050(type-of-animal "striped")
4051 4051
4052@end group 4052@end group
4053@end smallexample 4053@end smallexample
4054 4054
4055@c Following sentence rewritten to prevent overfull hbox. 4055@c Following sentence rewritten to prevent overfull hbox.
4056@noindent 4056@noindent
4057When you evaluate @code{(type-of-animal 'fierce)}, you will see the 4057When you evaluate @code{(type-of-animal "fierce")}, you will see the
4058following message printed in the echo area: @code{"Its a tiger!"}; but 4058following message printed in the echo area: @code{"It is a tiger!"}; but
4059when you evaluate @code{(type-of-animal 'zebra)}, you will see 4059when you evaluate @code{(type-of-animal "striped")}, you will see
4060@code{"Its not fierce!"}. 4060@code{"It is not fierce!"}.
4061 4061
4062(Of course, if the @var{characteristic} were @code{ferocious}, the 4062(Of course, if the @var{characteristic} were @code{"ferocious"}, the
4063message @code{"Its not fierce!"} would be printed; and it would be 4063message @code{"It is not fierce!"} would be printed; and it would be
4064misleading! When you write code, you need to take into account the 4064misleading! When you write code, you need to take into account the
4065possibility that some such argument will be tested by the @code{if} 4065possibility that some such argument will be tested by the @code{if}
4066and write your program accordingly.) 4066and write your program accordingly.)
@@ -6348,7 +6348,7 @@ With arg N, put point N/10 of the way
6348from the true beginning. 6348from the true beginning.
6349@end group 6349@end group
6350@group 6350@group
6351Dont use this in Lisp programs! 6351Don't use this in Lisp programs!
6352\(goto-char (point-min)) is faster 6352\(goto-char (point-min)) is faster
6353and does not set the mark." 6353and does not set the mark."
6354 (interactive "P") 6354 (interactive "P")
@@ -7604,8 +7604,8 @@ Here is the complete text of the version 22 implementation of the function:
7604@smallexample 7604@smallexample
7605@group 7605@group
7606(defun zap-to-char (arg char) 7606(defun zap-to-char (arg char)
7607 "Kill up to and including ARGth occurrence of CHAR. 7607 "Kill up to and including ARG'th occurrence of CHAR.
7608Case is ignored if case-fold-search is non-nil in the current buffer. 7608Case is ignored if `case-fold-search' is non-nil in the current buffer.
7609Goes backward if ARG is negative; error if CHAR not found." 7609Goes backward if ARG is negative; error if CHAR not found."
7610 (interactive "p\ncZap to char: ") 7610 (interactive "p\ncZap to char: ")
7611 (if (char-table-p translation-table-for-input) 7611 (if (char-table-p translation-table-for-input)
@@ -7620,6 +7620,19 @@ Goes backward if ARG is negative; error if CHAR not found."
7620The documentation is thorough. You do need to know the jargon meaning 7620The documentation is thorough. You do need to know the jargon meaning
7621of the word ``kill''. 7621of the word ``kill''.
7622 7622
7623@cindex curved quotes
7624@cindex curly quotes
7625The version 22 documentation string for @code{zap-to-char} uses ASCII
7626grave accent and apostrophe to quote a symbol, so it appears as
7627@t{`case-fold-search'}. This quoting style was inspired by 1970s-era
7628displays in which grave accent and apostrophe were often mirror images
7629suitable for use as quotes. On most modern displays this is no longer
7630true, and when these two ASCII characters appear in documentation
7631strings or diagnostic message formats, Emacs typically transliterates
7632them to curved single quotes, so that the abovequoted symbol appears
7633as @t{‘case-fold-search’}. Source-code strings can also simply use
7634curved quotes directly.
7635
7623@node zap-to-char interactive 7636@node zap-to-char interactive
7624@subsection The @code{interactive} Expression 7637@subsection The @code{interactive} Expression
7625 7638
@@ -7863,7 +7876,7 @@ to make one entry in the kill ring.
7863 7876
7864In Lisp code, optional third arg YANK-HANDLER, if non-nil, 7877In Lisp code, optional third arg YANK-HANDLER, if non-nil,
7865specifies the yank-handler text property to be set on the killed 7878specifies the yank-handler text property to be set on the killed
7866text. See insert-for-yank." 7879text. See `insert-for-yank'."
7867 ;; Pass point first, then mark, because the order matters 7880 ;; Pass point first, then mark, because the order matters
7868 ;; when calling kill-append. 7881 ;; when calling kill-append.
7869 (interactive (list (point) (mark))) 7882 (interactive (list (point) (mark)))
@@ -8291,9 +8304,9 @@ function:
8291@smallexample 8304@smallexample
8292@group 8305@group
8293(defun copy-region-as-kill (beg end) 8306(defun copy-region-as-kill (beg end)
8294 "Save the region as if killed, but dont kill it. 8307 "Save the region as if killed, but don't kill it.
8295In Transient Mark mode, deactivate the mark. 8308In Transient Mark mode, deactivate the mark.
8296If interprogram-cut-function is non-nil, also save the text for a window 8309If `interprogram-cut-function' is non-nil, also save the text for a window
8297system cut and paste." 8310system cut and paste."
8298 (interactive "r") 8311 (interactive "r")
8299@end group 8312@end group
@@ -8573,28 +8586,16 @@ function which in turn uses the @code{setcar} function.
8573@unnumberedsubsubsec The @code{kill-new} function 8586@unnumberedsubsubsec The @code{kill-new} function
8574@findex kill-new 8587@findex kill-new
8575 8588
8576@c in GNU Emacs 22, additional documentation to kill-new:
8577@ignore
8578Optional third arguments YANK-HANDLER controls how the STRING is later
8579inserted into a buffer; see `insert-for-yank' for details.
8580When a yank handler is specified, STRING must be non-empty (the yank
8581handler, if non-nil, is stored as a `yank-handler' text property on STRING).
8582
8583When the yank handler has a non-nil PARAM element, the original STRING
8584argument is not used by `insert-for-yank'. However, since Lisp code
8585may access and use elements from the kill ring directly, the STRING
8586argument should still be a \"useful\" string for such uses."
8587@end ignore
8588@need 1200 8589@need 1200
8589The @code{kill-new} function looks like this: 8590In version 22 the @code{kill-new} function looks like this:
8590 8591
8591@smallexample 8592@smallexample
8592@group 8593@group
8593(defun kill-new (string &optional replace yank-handler) 8594(defun kill-new (string &optional replace yank-handler)
8594 "Make STRING the latest kill in the kill ring. 8595 "Make STRING the latest kill in the kill ring.
8595Set kill-ring-yank-pointer to point to it. 8596Set `kill-ring-yank-pointer' to point to it.
8596 8597
8597If `interprogram-cut-function is non-nil, apply it to STRING. 8598If `interprogram-cut-function' is non-nil, apply it to STRING.
8598Optional second argument REPLACE non-nil means that STRING will replace 8599Optional second argument REPLACE non-nil means that STRING will replace
8599the front of the kill ring, rather than being added to the list. 8600the front of the kill ring, rather than being added to the list.
8600@dots{}" 8601@dots{}"
@@ -10089,10 +10090,10 @@ With argument, rotate that many kills forward (or backward, if negative)."
10089 10090
10090(defun current-kill (n &optional do-not-move) 10091(defun current-kill (n &optional do-not-move)
10091 "Rotate the yanking point by N places, and then return that kill. 10092 "Rotate the yanking point by N places, and then return that kill.
10092If N is zero, interprogram-paste-function is set, and calling it 10093If N is zero, `interprogram-paste-function' is set, and calling it
10093returns a string, then that string is added to the front of the 10094returns a string, then that string is added to the front of the
10094kill ring and returned as the latest kill. 10095kill ring and returned as the latest kill.
10095If optional arg DO-NOT-MOVE is non-nil, then dont actually move the 10096If optional arg DO-NOT-MOVE is non-nil, then don't actually move the
10096yanking point; just return the Nth kill forward." 10097yanking point; just return the Nth kill forward."
10097 (let ((interprogram-paste (and (= n 0) 10098 (let ((interprogram-paste (and (= n 0)
10098 interprogram-paste-function 10099 interprogram-paste-function
@@ -12427,10 +12428,10 @@ Here is the code for @code{forward-sentence}:
12427@smallexample 12428@smallexample
12428@group 12429@group
12429(defun forward-sentence (&optional arg) 12430(defun forward-sentence (&optional arg)
12430 "Move forward to next sentence-end’. With argument, repeat. 12431 "Move forward to next end of sentence. With argument, repeat.
12431With negative argument, move backward repeatedly to sentence-beginning’. 12432With negative argument, move backward repeatedly to start of sentence.
12432 12433
12433The variable sentence-end is a regular expression that matches ends of 12434The variable `sentence-end' is a regular expression that matches ends of
12434sentences. Also, every paragraph boundary terminates sentences as well." 12435sentences. Also, every paragraph boundary terminates sentences as well."
12435@end group 12436@end group
12436@group 12437@group
@@ -17520,8 +17521,13 @@ Incidentally, @code{load-library} is an interactive interface to the
17520@smallexample 17521@smallexample
17521@group 17522@group
17522(defun load-library (library) 17523(defun load-library (library)
17523 "Load the library named LIBRARY. 17524 "Load the Emacs Lisp library named LIBRARY.
17524This is an interface to the function ‘load’." 17525This is an interface to the function `load'. LIBRARY is searched
17526for in `load-path', both with and without `load-suffixes' (as
17527well as `load-file-rep-suffixes').
17528
17529See Info node `(emacs)Lisp Libraries' for more details.
17530See `load-file' for a different interface to `load'."
17525 (interactive 17531 (interactive
17526 (list (completing-read "Load library: " 17532 (list (completing-read "Load library: "
17527 (apply-partially 'locate-file-completion-table 17533 (apply-partially 'locate-file-completion-table
@@ -19005,13 +19011,21 @@ The @code{current-kill} function is used by @code{yank} and by
19005@group 19011@group
19006(defun current-kill (n &optional do-not-move) 19012(defun current-kill (n &optional do-not-move)
19007 "Rotate the yanking point by N places, and then return that kill. 19013 "Rotate the yanking point by N places, and then return that kill.
19008If N is zero, ‘interprogram-paste-function’ is set, and calling it 19014If N is zero and `interprogram-paste-function' is set to a
19009returns a string, then that string is added to the front of the 19015function that returns a string or a list of strings, and if that
19010kill ring and returned as the latest kill. 19016function doesn't return nil, then that string (or list) is added
19017to the front of the kill ring and the string (or first string in
19018the list) is returned as the latest kill.
19011@end group 19019@end group
19012@group 19020@group
19013If optional arg DO-NOT-MOVE is non-nil, then don’t actually move the 19021If N is not zero, and if `yank-pop-change-selection' is
19014yanking point; just return the Nth kill forward." 19022non-nil, use `interprogram-cut-function' to transfer the
19023kill at the new yank point into the window system selection.
19024@end group
19025@group
19026If optional arg DO-NOT-MOVE is non-nil, then don't actually
19027move the yanking point; just return the Nth kill forward."
19028
19015 (let ((interprogram-paste (and (= n 0) 19029 (let ((interprogram-paste (and (= n 0)
19016 interprogram-paste-function 19030 interprogram-paste-function
19017 (funcall interprogram-paste-function)))) 19031 (funcall interprogram-paste-function))))
@@ -19023,8 +19037,10 @@ yanking point; just return the Nth kill forward."
19023 ;; text to the kill ring, so Emacs doesn't try to own the 19037 ;; text to the kill ring, so Emacs doesn't try to own the
19024 ;; selection, with identical text. 19038 ;; selection, with identical text.
19025 (let ((interprogram-cut-function nil)) 19039 (let ((interprogram-cut-function nil))
19026 (kill-new interprogram-paste)) 19040 (if (listp interprogram-paste)
19027 interprogram-paste) 19041 (mapc 'kill-new (nreverse interprogram-paste))
19042 (kill-new interprogram-paste)))
19043 (car kill-ring))
19028@end group 19044@end group
19029@group 19045@group
19030 (or kill-ring (error "Kill ring is empty")) 19046 (or kill-ring (error "Kill ring is empty"))
@@ -19032,8 +19048,12 @@ yanking point; just return the Nth kill forward."
19032 (nthcdr (mod (- n (length kill-ring-yank-pointer)) 19048 (nthcdr (mod (- n (length kill-ring-yank-pointer))
19033 (length kill-ring)) 19049 (length kill-ring))
19034 kill-ring))) 19050 kill-ring)))
19035 (or do-not-move 19051 (unless do-not-move
19036 (setq kill-ring-yank-pointer ARGth-kill-element)) 19052 (setq kill-ring-yank-pointer ARGth-kill-element)
19053 (when (and yank-pop-change-selection
19054 (> n 0)
19055 interprogram-cut-function)
19056 (funcall interprogram-cut-function (car ARGth-kill-element))))
19037 (car ARGth-kill-element))))) 19057 (car ARGth-kill-element)))))
19038@end group 19058@end group
19039@end smallexample 19059@end smallexample
@@ -19344,15 +19364,15 @@ The code looks like this:
19344 "Reinsert (\"paste\") the last stretch of killed text. 19364 "Reinsert (\"paste\") the last stretch of killed text.
19345More precisely, reinsert the stretch of killed text most recently 19365More precisely, reinsert the stretch of killed text most recently
19346killed OR yanked. Put point at end, and set mark at beginning. 19366killed OR yanked. Put point at end, and set mark at beginning.
19347With just \\[universal-argument] as argument, same but put point at 19367With just \\[universal-argument] as argument, same but put point at beginning (and mark at end).
19348beginning (and mark at end). With argument N, reinsert the Nth most 19368With argument N, reinsert the Nth most recently killed stretch of killed
19349recently killed stretch of killed text. 19369text.
19350 19370
19351When this command inserts killed text into the buffer, it honors 19371When this command inserts killed text into the buffer, it honors
19352yank-excluded-properties and yank-handler as described in the 19372`yank-excluded-properties' and `yank-handler' as described in the
19353doc string for insert-for-yank-1, which see. 19373doc string for `insert-for-yank-1', which see.
19354 19374
19355See also the command \\[yank-pop]." 19375See also the command `yank-pop' (\\[yank-pop])."
19356@end group 19376@end group
19357@group 19377@group
19358 (interactive "*P") 19378 (interactive "*P")
@@ -19368,8 +19388,7 @@ See also the command \\[yank-pop]."
19368 ((eq arg '-) -2) 19388 ((eq arg '-) -2)
19369 (t (1- arg))))) 19389 (t (1- arg)))))
19370 (if (consp arg) 19390 (if (consp arg)
19371 ;; This is like exchange-point-and-mark, 19391 ;; This is like exchange-point-and-mark, but doesn't activate the mark.
19372 ;; but doesn't activate the mark.
19373 ;; It is cleaner to avoid activation, even though the command 19392 ;; It is cleaner to avoid activation, even though the command
19374 ;; loop would deactivate the mark because we inserted text. 19393 ;; loop would deactivate the mark because we inserted text.
19375 (goto-char (prog1 (mark t) 19394 (goto-char (prog1 (mark t)