Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixing bug where front of the list wouldn't be deleted (oops, thought…

… I'd checked for that :S Possibly only partially..)
  • Loading branch information...
commit 89838f510c7bc274ef602670101041f6ebfb37ef 1 parent ce6f3cb
Mark Hepburn authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 tags-view.el
View
6 tags-view.el
@@ -249,9 +249,11 @@ Argument is a marker that will be displayed, along with
(defun tv-delete-tag-for-etags (stack-position)
(ring-remove tags-location-ring stack-position))
(defun tv-delete-tag-for-gtags (stack-position)
- (labels
+ (macrolet
((delete-nth (n lst)
- (setcdr (nthcdr (1- n) lst) (nthcdr (1+ n) lst))))
+ `(if (zerop ,n)
+ (setq ,lst (cdr ,lst))
+ (setcdr (nthcdr (1- ,n) ,lst) (nthcdr (1+ ,n) ,lst)))))
(delete-nth stack-position gtags-point-stack)
(delete-nth stack-position gtags-buffer-stack)))
Please sign in to comment.
Something went wrong with that request. Please try again.