User: james
Date: 06/07/12 01:45:47
Modified: packages/xemacs-packages/xemacs-base ChangeLog comint.el
field.el
Log:
Fix bugs identified by Mike Kupfer, and update some docstrings.
<m3y7v6y7my.fsf(a)jerrypc.cs.usu.edu>
Revision Changes Path
1.188 +15 -0 XEmacs/packages/xemacs-packages/xemacs-base/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/xemacs-base/ChangeLog,v
retrieving revision 1.187
retrieving revision 1.188
diff -u -p -r1.187 -r1.188
--- ChangeLog 2006/06/16 10:26:02 1.187
+++ ChangeLog 2006/07/11 23:45:46 1.188
@@ -1,3 +1,18 @@
+2006-07-06 Jerry James <james(a)xemacs.org>
+
+ * comint.el (comint-output-filter): Don't move point to the bottom
+ unconditionally. Also, clean up old extents that no longer have a
+ buffer.
+ * field.el (find-field): When point was at the meeting place of
+ two fields, find-field was finding the field before point instead
+ of the field after point, like Emacs does.
+ * field.el (delete-field): Update the docstring with a warning
+ about args-out-of-range.
+ * field.el (field-string): Ditto.
+ * field.el (field-string-no-properties): Ditto.
+ * field.el (field-beginning): Ditto.
+ * field.el (field-end): Ditto.
+
2006-06-16 Norbert Koch <viteno(a)xemacs.org>
* Makefile (VERSION): XEmacs package 2.06 released.
1.18 +16 -3 XEmacs/packages/xemacs-packages/xemacs-base/comint.el
Index: comint.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/xemacs-base/comint.el,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -p -r1.17 -r1.18
--- comint.el 2006/06/15 22:45:12 1.17
+++ comint.el 2006/07/11 23:45:46 1.18
@@ -1789,15 +1789,15 @@ Make backspaces delete the previous char
(set-marker comint-last-output-start ostart)
(set-marker (process-mark process) (point))
(force-mode-line-update)
- (narrow-to-region obeg oend)
- (goto-char opoint)
(unless comint-inhibit-carriage-motion
;; Interpret any carriage motion characters (newline, backspace)
(comint-carriage-motion comint-last-output-start (point)))
;; Run these hooks with point where the user had it.
+ (goto-char opoint)
(run-hook-with-args 'comint-output-filter-functions string)
+ (setq opoint (point))
(goto-char (process-mark process)) ; in case a filter moved it
@@ -1820,6 +1820,15 @@ Make backspaces delete the previous char
(add-text-properties
prompt-start (point)
'(read-only t end-open t start-open (read-only))))
+
+ ;; XEmacs change: if the existing prompt extent is for a
+ ;; different buffer, kill it
+ (unless (or (null comint-last-prompt-extent)
+ (eq (extent-object comint-last-prompt-extent)
+ oprocbuf))
+ (delete-extent comint-last-prompt-extent)
+ (setq comint-last-prompt-extent nil))
+
(unless (and (bolp) (null comint-last-prompt-extent))
;; Need to create or move the prompt extent (in the case
;; where there is no prompt ((bolp) == t), we still do
@@ -1833,7 +1842,11 @@ Make backspaces delete the previous char
(make-extent prompt-start (point)))
(set-extent-property
comint-last-prompt-extent
- 'font-lock-face 'comint-highlight-prompt)))))))))
+ 'font-lock-face 'comint-highlight-prompt))))
+
+ ;; Put point back where the user left it
+ (narrow-to-region obeg oend)
+ (goto-char opoint))))))
;; XEmacs: Use a variable for this so that new commands can be added easily.
(defcustom comint-scroll-to-bottom-on-input-commands
1.4 +23 -9 XEmacs/packages/xemacs-packages/xemacs-base/field.el
Index: field.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/xemacs-base/field.el,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- field.el 2006/05/25 02:49:47 1.3
+++ field.el 2006/07/11 23:45:46 1.4
@@ -22,7 +22,7 @@
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
-;;; Synched up with: FSF 21.3 + 09072004 CVS editfns.c.
+;;; Synched up with: editfns.c CVS revision 1.416
;;; Commentary:
@@ -112,9 +112,8 @@ If SKIP-STOP is non-nil, do not computer
;; MERGE-AT-BOUNDARY is non-nil (see docstring) is actually the more
;; natural one; then we avoid treating the beginning of a field specially.
(unless merge-at-boundary
- (let ((field
- (map-extents #'(lambda (ext ign) (extent-property ext 'field))
- nil pos pos nil nil 'field)))
+ (let* ((ext (extent-at pos nil 'field))
+ (field (if ext (extent-property ext 'field))))
(unless (eq field after-field)
(setq at-field-end t))
(unless (eq field before-field)
@@ -183,7 +182,10 @@ If SKIP-STOP is non-nil, do not computer
(defun delete-field (&optional pos)
"Delete the field surrounding POS.
A field is a region of text with the same `field' property.
-If POS is nil, the value of point is used for POS."
+If POS is nil, the value of point is used for POS.
+
+An `args-out-of-range' error is signaled if POS is outside the
+buffer's accessible portion."
(let* ((field (find-field pos))
(start (car field))
(end (cdr field)))
@@ -194,7 +196,10 @@ If POS is nil, the value of point is use
(defun field-string (&optional pos)
"Return the contents of the field surrounding POS as a string.
A field is a region of text with the same `field' property.
-If POS is nil, the value of point is used for POS."
+If POS is nil, the value of point is used for POS.
+
+An `args-out-of-range' error is signaled if POS is outside the
+buffer's accessible portion."
(let ((field (find-field pos)))
(buffer-substring (car field) (cdr field))))
@@ -202,7 +207,10 @@ If POS is nil, the value of point is use
(defun field-string-no-properties (&optional pos)
"Return the contents of the field around POS, without text-properties.
A field is a region of text with the same `field' property.
-If POS is nil, the value of point is used for POS."
+If POS is nil, the value of point is used for POS.
+
+An `args-out-of-range' error is signaled if POS is outside the
+buffer's accessible portion."
(let ((field (find-field pos)))
(buffer-substring-no-properties (car field) (cdr field))))
@@ -214,7 +222,10 @@ If POS is nil, the value of point is use
If ESCAPE-FROM-EDGE is non-nil and POS is at the beginning of its
field, then the beginning of the *previous* field is returned.
If LIMIT is non-nil, it is a buffer position; if the beginning of the field
-is before LIMIT, then LIMIT will be returned instead."
+is before LIMIT, then LIMIT will be returned instead.
+
+An `args-out-of-range' error is signaled if POS is outside the
+buffer's accessible portion."
(car (find-field pos escape-from-edge limit nil nil t)))
;;;###autoload
@@ -225,7 +236,10 @@ If POS is nil, the value of point is use
If ESCAPE-FROM-EDGE is non-nil and POS is at the end of its field,
then the end of the *following* field is returned.
If LIMIT is non-nil, it is a buffer position; if the end of the field
-is after LIMIT, then LIMIT will be returned instead."
+is after LIMIT, then LIMIT will be returned instead.
+
+An `args-out-of-range' error is signaled if POS is outside the
+buffer's accessible portion."
(cdr (find-field pos escape-from-edge nil limit t nil)))
;;;###autoload