X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/0c94c8d603031f6b665ae7f3136ca77fb573fd7e..fb39b937b0628f4592b07d0aa61a41cf696abd30:/src/textprop.c
diff --git a/src/textprop.c b/src/textprop.c
index 20d98b0e6f..872912ea70 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License
along with GNU Emacs. If not, see . */
#include
-#include
+
#include "lisp.h"
#include "intervals.h"
#include "character.h"
@@ -556,7 +556,8 @@ If POSITION is at the end of OBJECT, the value is nil. */)
DEFUN ("get-text-property", Fget_text_property, Sget_text_property, 2, 3, 0,
doc: /* Return the value of POSITION's property PROP, in OBJECT.
-OBJECT is optional and defaults to the current buffer.
+OBJECT should be a buffer or a string; if omitted or nil, it defaults
+to the current buffer.
If POSITION is at the end of OBJECT, the value is nil. */)
(Lisp_Object position, Lisp_Object prop, Lisp_Object object)
{
@@ -760,7 +761,7 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT. */)
if (BUFFERP (object) && current_buffer != XBUFFER (object))
{
- record_unwind_protect (Fset_buffer, Fcurrent_buffer ());
+ record_unwind_current_buffer ();
Fset_buffer (object);
}
@@ -843,7 +844,7 @@ position LIMIT; return LIMIT if nothing is found before reaching LIMIT. */)
if (BUFFERP (object) && current_buffer != XBUFFER (object))
{
- record_unwind_protect (Fset_buffer, Fcurrent_buffer ());
+ record_unwind_current_buffer ();
Fset_buffer (object);
}