From: martin rudalics <rudalics@gmx.at>
To: Dmitry Bolshakov <dmitry.bolshakov@bridge-quest.com>
Cc: bug-gnu-emacs@gnu.org
Subject: Re: win32 emacs 22.1 crashes in longlines mode + outline minor mode
Date: Wed, 14 Nov 2007 10:03:29 +0100 [thread overview]
Message-ID: <473AB9E1.1080109@gmx.at> (raw)
In-Reply-To: <E1IrsQp-0005D9-Na@lists.gnu.org>
[-- Attachment #1: Type: text/plain, Size: 483 bytes --]
> 1. Open text file
>
> 2.
>
> M-x longlines-mode
>
> M-x longlines-show-hard-newlines
At the time I'm here the buffer is already modified since modification
hooks are not inhibited in `longlines-show-hard-newlines', thus calling
`longlines-after-change-function' which subsequently causes to run
`longlines-post-command-function' which runs `longlines-show-region' a
second time _without_ saving the buffer-modified state though, ...
The attached patch should handle this.
[-- Attachment #2: longlines.patch --]
[-- Type: text/plain, Size: 1650 bytes --]
*** longlines.el.~1.40.~ Fri Nov 2 09:54:54 2007
--- longlines.el Wed Nov 14 09:42:18 2007
***************
*** 220,226 ****
(let* ((pmin (min beg end))
(pmax (max beg end))
(pos (text-property-not-all pmin pmax 'hard nil))
! (inhibit-read-only t))
(while pos
(put-text-property pos (1+ pos) 'display
(copy-sequence longlines-show-effect))
--- 220,227 ----
(let* ((pmin (min beg end))
(pmax (max beg end))
(pos (text-property-not-all pmin pmax 'hard nil))
! (inhibit-read-only t)
! (inhibit-modification-hooks t))
(while pos
(put-text-property pos (1+ pos) 'display
(copy-sequence longlines-show-effect))
***************
*** 230,239 ****
"Make hard newlines invisible again."
(interactive)
(setq longlines-showing nil)
! (let ((pos (text-property-not-all (point-min) (point-max) 'hard nil)))
(while pos
(remove-text-properties pos (1+ pos) '(display))
! (setq pos (text-property-not-all (1+ pos) (point-max) 'hard nil)))))
;; Wrapping the paragraphs.
--- 231,245 ----
"Make hard newlines invisible again."
(interactive)
(setq longlines-showing nil)
! (let ((pos (text-property-not-all (point-min) (point-max) 'hard nil))
! (buffer-undo-list t)
! (mod (buffer-modified-p))
! (inhibit-read-only t)
! (inhibit-modification-hooks t))
(while pos
(remove-text-properties pos (1+ pos) '(display))
! (setq pos (text-property-not-all (1+ pos) (point-max) 'hard nil)))
! (set-buffer-modified-p mod)))
;; Wrapping the paragraphs.
prev parent reply other threads:[~2007-11-14 9:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-13 9:51 win32 emacs 22.1 crashes in longlines mode + outline minor mode Dmitry Bolshakov
2007-11-13 20:34 ` Juanma Barranquero
2007-11-13 21:13 ` Jason Rumney
2007-11-14 9:03 ` martin rudalics [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=473AB9E1.1080109@gmx.at \
--to=rudalics@gmx.at \
--cc=bug-gnu-emacs@gnu.org \
--cc=dmitry.bolshakov@bridge-quest.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).