diff options
author | Artur Malabarba <bruce.connor.am@gmail.com> | 2015-02-12 14:18:55 -0200 |
---|---|---|
committer | Artur Malabarba <bruce.connor.am@gmail.com> | 2015-02-12 14:18:55 -0200 |
commit | ade5fe434b5fd031db8cd4e601f26f2933354ab2 (patch) | |
tree | fa545d43049af7c2465a78f84952dc9355f9a409 | |
parent | 21d1b2594efaff4089d2bab736e0a18a1ee1a9db (diff) |
Compiler warnings
-rw-r--r-- | sx-button.el | 10 | ||||
-rw-r--r-- | sx.el | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sx-button.el b/sx-button.el index 5a2f052..46855e7 100644 --- a/sx-button.el +++ b/sx-button.el @@ -77,23 +77,23 @@ This is usually a link's URL, or the content of a code block." (point) 'sx-button-copy-type) content))))) -(defun sx-button-edit-this (text-or-marker &optional major-mode) - "Open a temp buffer populated with the string TEXT-OR-MARKER using MAJOR-MODE. +(defun sx-button-edit-this (text-or-marker &optional majormode) + "Open a temp buffer populated with the string TEXT-OR-MARKER using MAJORMODE. When given a marker (or interactively), use the 'sx-button-copy and the 'sx-mode text-properties under the marker. These are usually part of a code-block." (interactive (list (point-marker))) ;; Buttons receive markers. (when (markerp text-or-marker) - (setq major-mode (get-text-property text-or-marker 'sx-mode)) + (setq majormode (get-text-property text-or-marker 'sx-mode)) (unless (setq text-or-marker (get-text-property text-or-marker 'sx-button-copy)) (sx-message "Nothing of interest here."))) (with-current-buffer (pop-to-buffer (generate-new-buffer "*sx temp buffer*")) (insert text-or-marker) - (when major-mode - (funcall major-mode)))) + (when majormode + (funcall majormode)))) (defun sx-button-follow-link (&optional pos) "Follow link at POS. If POS is nil, use `point'." @@ -204,7 +204,7 @@ is intentionally skipped." (while (and ;; We're not at the end. (cdr-safe tail) ;; We're not at the right place. - (,(or predicate #'<) x (cadr tail))) + (funcall (or ,predicate #'<) x (cadr tail))) (setq tail (cdr tail))) (setcdr tail (cons x (cdr tail))))) |