From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.emacs.devel Subject: `mark' func returning nil Date: Thu, 05 Jan 2006 09:19:28 +1100 Message-ID: <87r77nab67.fsf@zip.com.au> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1136423071 26358 80.91.229.2 (5 Jan 2006 01:04:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 5 Jan 2006 01:04:31 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 05 02:04:28 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EuJYC-0005b6-1g for ged-emacs-devel@m.gmane.org; Thu, 05 Jan 2006 02:04:22 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EuJZt-00059q-GW for ged-emacs-devel@m.gmane.org; Wed, 04 Jan 2006 20:06:05 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EuH11-0002ul-4S for emacs-devel@gnu.org; Wed, 04 Jan 2006 17:21:55 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EuH0w-0002sj-5t for emacs-devel@gnu.org; Wed, 04 Jan 2006 17:21:54 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EuH0w-0002sg-1Q for emacs-devel@gnu.org; Wed, 04 Jan 2006 17:21:50 -0500 Original-Received: from [61.8.0.84] (helo=mailout1.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EuH2O-0004Ma-I3 for emacs-devel@gnu.org; Wed, 04 Jan 2006 17:23:21 -0500 Original-Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.0.86]) by mailout1.pacific.net.au (8.13.4/8.13.4/Debian-3) with ESMTP id k04MJxad012844 for ; Thu, 5 Jan 2006 09:19:59 +1100 Original-Received: from localhost (ppp202F.dyn.pacific.net.au [61.8.32.47]) by mailproxy1.pacific.net.au (8.13.4/8.13.4/Debian-3) with ESMTP id k04MJvFL014801 for ; Thu, 5 Jan 2006 09:19:57 +1100 Original-Received: from gg by localhost with local (Exim 3.36 #1 (Debian)) id 1EuGyf-0000jX-00; Thu, 05 Jan 2006 09:19:29 +1100 Original-To: emacs-devel@gnu.org User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) X-Mailman-Approved-At: Wed, 04 Jan 2006 20:04:31 -0500 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:48728 Archived-At: --=-=-= The docstring and manual of the `mark' func reads to me like it always returns an integer, and the nil return is only if you use the FORCE arg. But if I'm not mistaken nil is normal when the mark has never been set in a buffer (eg. C-x b foo C-: (mark) => nil). It'd be nice if that could be clarified, since I didn't realize it until I'd written some code expecting an integer, which bombed in a new buffer. 2006-01-02 Kevin Ryde * simple.el (mark): Clarify docstring, return is nil if mark not yet set. * markers.texi (The Mark): Clarify `mark', return is nil if mark not yet set. --=-=-= Content-Disposition: attachment; filename=simple.el.diff Index: simple.el =================================================================== RCS file: /sources/emacs/emacs/lisp/simple.el,v retrieving revision 1.782 diff -u -c -r1.782 simple.el cvs diff: conflicting specifications of output style *** simple.el 28 Dec 2005 21:52:33 -0000 1.782 --- simple.el 4 Jan 2006 22:14:15 -0000 *************** *** 1,7 **** ;;; simple.el --- basic editing commands for Emacs ;; Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, 1999, ! ;; 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: internal --- 1,7 ---- ;;; simple.el --- basic editing commands for Emacs ;; Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, 1999, ! ;; 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: internal *************** *** 3069,3078 **** "Hook run when the mark becomes inactive.") (defun mark (&optional force) ! "Return this buffer's mark value as integer; error if mark inactive. ! If optional argument FORCE is non-nil, access the mark value ! even if the mark is not currently active, and return nil ! if there is no mark at all. If you are using this in an editing command, you are most likely making a mistake; see the documentation of `set-mark'." --- 3069,3082 ---- "Hook run when the mark becomes inactive.") (defun mark (&optional force) ! "Return this buffer's mark value. ! The return is an integer buffer position, or nil if the mark is not ! yet set for this buffer. ! ! In `transient-mark-mode', and unless `mark-even-if-inactive' is set, ! then an error is signalled if the mark is inactive. Optional ! argument FORCE can be non-nil to get the mark anyway (as an integer ! or nil). If you are using this in an editing command, you are most likely making a mistake; see the documentation of `set-mark'." --=-=-= Content-Disposition: attachment; filename=markers.texi.diff *** markers.texi.~1.24.~ 2005-08-28 10:15:57.000000000 +1000 --- markers.texi 2006-01-05 09:18:54.602488696 +1100 *************** *** 1,7 **** @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. @c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2002, 2003, ! @c 2004, 2005 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../info/markers @node Markers, Text, Positions, Top --- 1,7 ---- @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. @c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2002, 2003, ! @c 2004, 2005, 2006 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../info/markers @node Markers, Text, Positions, Top *************** *** 441,453 **** @defun mark &optional force @cindex current buffer mark ! This function returns the current buffer's mark position as an integer. ! If Transient Mark mode is enabled, @code{mark-even-if-inactive} is ! @code{nil} and the mark is inactive, @code{mark} normally signals ! an error. However, if @var{force} is non-@code{nil}, then @code{mark} ! returns the mark position anyway---or @code{nil}, if the mark is not ! yet set for this buffer. @end defun @defun mark-marker --- 441,454 ---- @defun mark &optional force @cindex current buffer mark ! This function returns the current buffer's mark position as an ! integer, or @code{nil} if the mark is not yet set for this buffer. ! If Transient Mark mode is enabled, and unless ! @code{mark-even-if-inactive} is non-@code{nil}, then @code{mark} ! signals an error if the mark is inactive. However, if @var{force} is ! non-@code{nil}, then @code{mark} returns the mark position anyway (an ! integer or @code{nil}). @end defun @defun mark-marker --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --=-=-=--