/[emacs]/emacs/lisp/smerge-mode.el
ViewVC logotype

Diff of /emacs/lisp/smerge-mode.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.14 by gerd, Tue Jul 31 08:28:43 2001 UTC revision 1.15 by monnier, Thu Nov 15 01:25:35 2001 UTC
# Line 332  An error is raised if not inside a confl Line 332  An error is raised if not inside a confl
332                                    (when base-start (1- base-start)) base-start                                    (when base-start (1- base-start)) base-start
333                                    (1- other-start) other-start))                                    (1- other-start) other-start))
334            t)            t)
335        (error "Point not in conflict region"))))        (search-failed (error "Point not in conflict region")))))
336    
337  (defun smerge-find-conflict (&optional limit)  (defun smerge-find-conflict (&optional limit)
338    "Find and match a conflict region.  Intended as a font-lock MATCHER.    "Find and match a conflict region.  Intended as a font-lock MATCHER.
# Line 350  The point is moved to the end of the con Line 350  The point is moved to the end of the con
350    (smerge-ensure-match n2)    (smerge-ensure-match n2)
351    (let ((name1 (aref smerge-match-names n1))    (let ((name1 (aref smerge-match-names n1))
352          (name2 (aref smerge-match-names n2))          (name2 (aref smerge-match-names n2))
353            ;; Read them before the match-data gets clobbered.
354            (beg1 (match-beginning n1))
355            (end1 (match-end n1))
356            (beg2 (match-beginning n2))
357            (end2 (match-end n2))
358          (file1 (make-temp-file "smerge1"))          (file1 (make-temp-file "smerge1"))
359          (file2 (make-temp-file "smerge2"))          (file2 (make-temp-file "smerge2"))
360          (dir default-directory)          (dir default-directory)
361          (file (file-relative-name buffer-file-name)))          (file (file-relative-name buffer-file-name))
362      (write-region (match-beginning n1) (match-end n1) file1)          (coding-system-for-read buffer-file-coding-system))
363      (write-region (match-beginning n2) (match-end n2) file2)      (write-region beg1 end1 file1)
364        (write-region beg2 end2 file2)
365      (unwind-protect      (unwind-protect
366          (with-current-buffer (get-buffer-create smerge-diff-buffer-name)          (with-current-buffer (get-buffer-create smerge-diff-buffer-name)
367            (setq default-directory dir)            (setq default-directory dir)

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26