unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Docstring of compare-buffer-substrings
@ 2016-10-02 17:59 Philipp Stephani
  2016-10-03  7:13 ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Philipp Stephani @ 2016-10-02 17:59 UTC (permalink / raw)
  To: Emacs developers


[-- Attachment #1.1: Type: text/plain, Size: 149 bytes --]

Hi,

compare-buffer-substring allows all its arguments to be nil, but the
docstring doesn't say that. Attached is a patch that amends the docstring.

[-- Attachment #1.2: Type: text/html, Size: 198 bytes --]

[-- Attachment #2: 0001-Document-nil-args-of-compare-buffer-substrings.txt --]
[-- Type: text/plain, Size: 1237 bytes --]

From ab84e3ce5df8a648814e9b30fa10aa401e1feafb Mon Sep 17 00:00:00 2001
From: Philipp Stephani <phst@google.com>
Date: Sun, 2 Oct 2016 19:58:39 +0200
Subject: [PATCH] Document nil args of compare-buffer-substrings

* editfns.c (Fcompare_buffer_substrings): Document behavior when
the arguments are nil.
---
 src/editfns.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/editfns.c b/src/editfns.c
index 0bcc439..dcb1d8d 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -2936,6 +2936,10 @@ Return -N if first string is less after N-1 chars, +N if first string is
 greater after N-1 chars, or 0 if strings match.
 The first substring is in BUFFER1 from START1 to END1 and the second
 is in BUFFER2 from START2 to END2.
+All arguments may be nil.  If BUFFER1 or BUFFER2 is nil, the current
+buffer is used.  If START1 or START2 is nil, the value of `point-min'
+in the respective buffers is used.  If END1 or END2 is nil, the value
+of `point-max' in the respective buffers is used.
 The value of `case-fold-search' in the current buffer
 determines whether case is significant or ignored.  */)
   (Lisp_Object buffer1, Lisp_Object start1, Lisp_Object end1, Lisp_Object buffer2, Lisp_Object start2, Lisp_Object end2)
-- 
2.10.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-10-03 10:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-02 17:59 Docstring of compare-buffer-substrings Philipp Stephani
2016-10-03  7:13 ` Eli Zaretskii
2016-10-03 10:12   ` Philipp Stephani

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).