[slime-cvs] CVS slime
CVS User heller
heller at common-lisp.net
Sat Jan 3 21:33:51 UTC 2009
Update of /project/slime/cvsroot/slime
In directory cl-net:/tmp/cvs-serv11548
Modified Files:
ChangeLog slime.el
Log Message:
slime.el (slime-line-number-at-pos): New compatibility function.
--- /project/slime/cvsroot/slime/ChangeLog 2009/01/03 21:13:31 1.1629
+++ /project/slime/cvsroot/slime/ChangeLog 2009/01/03 21:33:51 1.1630
@@ -4,6 +4,7 @@
(slime-check-location-buffer-name-sanity)
(slime-check-location-filename-sanity): Separated from
slime-goto-location-buffer.
+ (slime-line-number-at-pos): New compatibility function.
2009-01-03 Helmut Eller <heller at common-lisp.net>
--- /project/slime/cvsroot/slime/slime.el 2009/01/03 21:13:37 1.1094
+++ /project/slime/cvsroot/slime/slime.el 2009/01/03 21:33:51 1.1095
@@ -2905,7 +2905,7 @@
(save-excursion
(slime-goto-source-location location)
(list (or (buffer-file-name) (buffer-name))
- (line-number-at-pos)
+ (slime-line-number-at-pos)
(1+ (current-column)))))
(format "%s:%d:%d:" (or filename "") line col)))
(t "")))
@@ -6487,11 +6487,7 @@
;; narrowed the buffer.
(save-restriction
(widen)
- (cons (cond ((fboundp 'line-number)
- (line-number)) ; XEmacs
- ((fboundp 'line-number-at-pos)
- (line-number-at-pos)) ; Recent GNU Emacs
- (t (1+ (count-lines 1 (point-at-bol)))))
+ (cons (slime-line-number-at-pos)
(current-column))))
(defun slime-inspector-operate-on-point ()
@@ -8378,6 +8374,13 @@
(apply #'run-mode-hooks hooks)
(apply #'run-hooks hooks)))
+(defun slime-line-number-at-pos ()
+ (cond ((fboundp 'line-number)
+ (line-number)) ; XEmacs
+ ((fboundp 'line-number-at-pos)
+ (line-number-at-pos)) ; Recent GNU Emacs
+ (t (1+ (count-lines 1 (point-at-bol))))))
+
(slime-defun-if-undefined next-single-char-property-change
(position prop &optional object limit)
(let ((limit (typecase limit
More information about the slime-cvs
mailing list