File tree Expand file tree Collapse file tree 2 files changed +9
-11
lines changed Expand file tree Collapse file tree 2 files changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -352,13 +352,11 @@ position with `xref-pop-marker-stack'."
352
352
(interactive " P" )
353
353
(let ((initial-loc (point-marker ))
354
354
(loc (haskell-mode-find-def (haskell-ident-at-point))))
355
- (if loc
356
- (haskell-mode-handle-generic-loc loc)
357
- (call-interactively 'haskell-mode-tag-find ))
358
- (unless (equal initial-loc (point-marker ))
359
- (save-excursion
360
- (goto-char initial-loc)
361
- (xref-push-marker-stack )))))
355
+ (if (not loc)
356
+ (call-interactively 'haskell-mode-tag-find )
357
+ (haskell-mode-handle-generic-loc loc)
358
+ (unless (equal initial-loc (point-marker ))
359
+ (xref-push-marker-stack initial-loc)))))
362
360
363
361
;;;### autoload
364
362
(defun haskell-mode-goto-loc ()
@@ -379,7 +377,7 @@ Requires the :loc-at command from GHCi."
379
377
(forward-char (plist-get span :start-col )))
380
378
381
379
(defun haskell-process-insert-type ()
382
- " Get the identifer at the point and insert its type.
380
+ " Get the identifier at the point and insert its type.
383
381
Use GHCi's :type if it's possible."
384
382
(let ((ident (haskell-ident-at-point)))
385
383
(when ident
Original file line number Diff line number Diff line change 35
35
(unless (fboundp 'xref-push-marker-stack )
36
36
(defalias 'xref-pop-marker-stack 'pop-tag-mark )
37
37
38
- (defun xref-push-marker-stack ()
39
- " Add point to the marker stack."
40
- (ring-insert find-tag-marker-ring (point-marker ))))
38
+ (defun xref-push-marker-stack (&optional m )
39
+ " Add point M (defaults to `point-marker' ) to the marker stack."
40
+ (ring-insert find-tag-marker-ring (or m ( point-marker ) ))))
41
41
42
42
(unless (fboundp 'outline-hide-sublevels )
43
43
(defalias 'outline-hide-sublevels 'hide-sublevels ))
You can’t perform that action at this time.
0 commit comments