🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.epoch.misc
Article #891

Stuck cursor mode - fix

#891
From: Brian L. Kahn
Date: Tue, 22 Jun 1993 21:00
20 lines
1437 bytes
I finally fired up the debugger and tracked down a problem I have had
with "stuck cursor mode" in which the cursor gets stuck in at the left
hand edge of the window after breaking out of y-or-n-p with a ^G.

My problem was caused by the use of after-update-hook, but I suspect
the problem can also be triggered by other hooks, particularly the
after change hooks.  The hook gets invoked in the middle of the abort
(exiting y-or-n-p with ^G) which induces the bug.  Workaround follows:

;; ignore hook during y-or-n-p processing
(defvar real-y-or-n-p (symbol-function 'y-or-n-p))
(defun y-or-n-p (&rest args)
  "Protect y-or-n-p from after-update-hook"
  (let ((after-update-hook nil))
    (apply real-y-or-n-p args)
    ))

--
B<   Brian Kahn   blk@mitre.org   "may the farce be with you"
Technical Details
Message-ID: <BLK.93Jun22160035@vanity.mitre.org>
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!sol.ctr.columbia.edu!howland.reston.ans.net!agate!linus!linus.mitre.org!news!mbunix!blk

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fc7ee,826df756967f7c1f,start
X-Google-Attributes: gidfc7ee,public
X-Google-ArrivalTime: 1993-06-22 14:24:19 PST
Newsgroups: gnu.epoch.misc
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!sol.ctr.columbia.edu!howland.reston.ans.net!agate!linus!linus.mitre.org!news!mbunix!blk
From: blk@mitre.org (Brian L. Kahn)
Subject: Stuck cursor mode - fix
Message-ID: <BLK.93Jun22160035@vanity.mitre.org>
Sender: news@linus.mitre.org (News Service)
Nntp-Posting-Host: vanity.mitre.org
Organization: The MITRE Corp. Bedford, MA
Distribution: gnu
Date: Tue, 22 Jun 1993 21:00:35 GMT
Lines: 21