[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
problems with smerge-mode.el
From: |
Alexandru Harsanyi |
Subject: |
problems with smerge-mode.el |
Date: |
Wed, 14 Dec 2005 21:29:00 +0800 |
Symptoms:
An error is signalled when I use smerge-mode to select one of the
alternatives of a CVS conflict. A stack trace looks like this:
Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-
p nil)
delete-region(nil 20191)
smerge-keep-n(3)
smerge-keep-current()
call-interactively(smerge-keep-current)
I used edebug to track down the problem, and it seems the problem is
in the function:
(defun smerge-keep-n (n)
(smerge-remove-props (match-beginning 0) (match-end 0))
;; We used to use replace-match, but that did not preserve markers
so well.
(delete-region (match-end n) (match-end 0))
(delete-region (match-beginning 0) (match-beginning n)))
it seems that after the smerge-remove-props call, the match data
information is lost so (match-end n) returns nil, causing
delete-region to fail. Changing the definition as below seems to fix
the problem.
(defun smerge-keep-n (n)
(let ((zero-start (match-beginning 0))
(zero-end (match-end 0))
(n-start (match-beginning n))
(n-end (match-end n)))
(smerge-remove-props zero-start zero-end)
;; We used to use replace-match, but that did not preserve
markers so well.
(delete-region n-end zero-end)
(delete-region zero-start n-start)))
If emacs crashed, and you have the emacs process in the gdb debugger,
please include the output from the following gdb commands:
`bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
/usr/local/share/emacs/22.0.50/etc/DEBUG for instructions.
In GNU Emacs 22.0.50.2 (powerpc-apple-darwin8.3.0)
of 2005-12-11 on karinji.local
X server distributor `Apple Computers', version 10.4.3
configured using `configure '--enable-carbon-app' '--without-x''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: nil
locale-coding-system: iso-8859-1
default-enable-multibyte-characters: t
Major mode: Emacs-Lisp
Minor modes in effect:
encoded-kbd-mode: t
display-time-mode: t
whitespace-global-mode: t
icomplete-mode: t
show-paren-mode: t
tooltip-mode: t
auto-compression-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
unify-8859-on-encoding-mode: t
utf-translate-cjk-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
<right> <right> <right> <right> <right> <right> <right>
<right> <right> <down> <down> <up> <up> C-x v l C-x
0 <down> <down> <down> C-v <up> <up> <up> C-v <up>
<up> <down> <right> <right> <up> <up> <up> <left> <left>
C-M-SPC C-g <down-mouse-1> <mouse-1> <down-mouse-1>
<mouse-1> <down-mouse-1> <mouse-1> <double-down-mouse-1>
<double-mouse-1> <down-mouse-1> <mouse-1> C-x b p a
C-s <return> <up> <up> <up> <up> <down> <down> <right>
<right> <up> <down> <down> <down> <down> <down> <right>
<right> <down> <down> <up> <up> <up> <right> <down>
<up> <up> C-x k <return> <down-mouse-1> <mouse-1> C-x
b <mac-apple-event> C-g M-x r e p o r t - e m <tab>
<return>
Recent messages:
(No files need saving)
Mark set
/Users/haral/Projects/ERG/incomming/dmlint/metacd/CdPayload.cpp clean.
Mark set
Running cvs in the background... done
Mark set
Quit
/Users/haral/pkg/emacs-packages/patch.el clean.
Quit
Loading emacsbug...done
- problems with smerge-mode.el,
Alexandru Harsanyi <=