Article View: gnu.emacs.bug
Article #87894(mh-comp.el) active marks that are actually nil
From: Roger Crew
Date: Wed, 24 Aug 1994 22:05
Date: Wed, 24 Aug 1994 22:05
42 lines
2878 bytes
2878 bytes
Doing mh-yank-cur-msg in an MH draft buffer when no mark has been set
in the corresponding show-+foo buffer results in a "There is no region
now" error. The problem is that we have
mark-active == t AND (marker-position (mark-marker)) == nil
simultaneously in the show-+foo buffer.
Either
(1) this should be prohibited (which may be a lost cause, given the number
of places that mark-active gets set without a corresponding check of
the current mark, though you could
(defun activate-mark (position &optional buffer) ...)
to go along with the currently present deactivate-mark
and tell people to use it), OR
(2) various pieces of code that check mark-active and then blithely go
ahead and do (region-beginning) should be doing a bit more work
(and the documentation for mark-active should be pointing out that
having mark-active set doesn't guarantee non-nilness of the mark...)
If (2), then here's the fix for mh-yank-cur-msg :
*** /usr/local/src/emacs-19/lisp/mh-comp.el Mon Mar 14 22:16:26 1994
--- - Wed Aug 24 14:23:33 1994
***************
*** 822,828 ****
(delete-windows-on mh-show-buffer))
(set-buffer mh-show-buffer) ; Find displayed message
! (let ((mh-ins-str (cond ((if (boundp 'mark-active)
! mark-active ;Emacs 19
! (mark)) ;Emacs 18
(buffer-substring (region-beginning)
(region-end)))
--- 822,828 ----
(delete-windows-on mh-show-buffer))
(set-buffer mh-show-buffer) ; Find displayed message
! (let ((mh-ins-str (cond ((and (or (not (boundp 'mark-active))
! mark-active) ;Emacs 19
! (marker-position (mark-marker)))
(buffer-substring (region-beginning)
(region-end)))
Technical Details
Message-ID:
<9408242204.AA06075@golem.research.microsoft.com>Path:
arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!uunet!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!math.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!research.microsoft.com!rfcReferences:
rfc@research.microsoft.com (Roger Crew)Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,5e6a781a41d41e98,start X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1994-08-24 18:01:41 PST Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!uunet!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!math.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!research.microsoft.com!rfc From: rfc@research.microsoft.com (Roger Crew) Newsgroups: gnu.emacs.bug Subject: (mh-comp.el) active marks that are actually nil Date: 24 Aug 1994 18:05:44 -0400 Organization: GNUs Not Usenet Lines: 43 Sender: daemon@cis.ohio-state.edu Approved: bug-gnu-emacs@prep.ai.mit.edu Distribution: gnu Message-ID: <9408242204.AA06075@golem.research.microsoft.com> References: rfc@research.microsoft.com (Roger Crew)