Skip to content

Commit

Permalink
fix byte-compiler issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sigma committed Feb 25, 2012
1 parent 1710362 commit a7031d4
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions gist.el
Expand Up @@ -247,19 +247,18 @@ and displays the list."
(xml-parse-region (match-beginning 0) (point-max))))) (xml-parse-region (match-beginning 0) (point-max)))))
(kill-buffer (current-buffer)) (kill-buffer (current-buffer))
(with-current-buffer (get-buffer-create "*gists*") (with-current-buffer (get-buffer-create "*gists*")
(toggle-read-only -1) (let ((inhibit-read-only t))
(goto-char (point-min)) (goto-char (point-min))
(save-excursion (save-excursion
(kill-region (point-min) (point-max)) (kill-region (point-min) (point-max))
(gist-insert-list-header) (gist-insert-list-header)
(mapc 'gist-insert-gist-link (xml-node-children (car gists))) (mapc 'gist-insert-gist-link (xml-node-children (car gists)))


;; remove the extra newline at the end ;; remove the extra newline at the end
(delete-backward-char 1)) (delete-char -1))


;; skip header ;; skip header
(forward-line) (forward-line))
(toggle-read-only t)
(set-window-buffer nil (current-buffer))))) (set-window-buffer nil (current-buffer)))))


(defun gist-insert-list-header () (defun gist-insert-list-header ()
Expand All @@ -275,7 +274,7 @@ and displays the list."
"Inserts a button that will open the given gist when pressed." "Inserts a button that will open the given gist when pressed."
(let* ((data (gist-parse-gist gist)) (let* ((data (gist-parse-gist gist))
(repo (string-to-number (car data)))) (repo (string-to-number (car data))))
(mapc '(lambda (x) (insert (format " %s " x))) data) (mapc (lambda (x) (insert (format " %s " x))) data)
(make-text-button (line-beginning-position) (line-end-position) (make-text-button (line-beginning-position) (line-end-position)
'repo repo 'repo repo
'action 'gist-fetch-button 'action 'gist-fetch-button
Expand Down

0 comments on commit a7031d4

Please sign in to comment.