Skip to content

Commit

Permalink
allow command override
Browse files Browse the repository at this point in the history
  • Loading branch information
hayamiz committed Jan 18, 2010
1 parent b2d0606 commit 8a7db54
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions ChangeLog
Expand Up @@ -777,6 +777,8 @@

* twittering-mode.el (twittering-status-not-blank-p): fix invalid escape sequence
(twittering-tinyurl-replace-at-point): disabled when 'mm-url' doesn't exist.
(twittering-command-prompt): allow command
override

2009-12-12 Alberto Garcia <agarcia@igalia.com>

Expand Down
7 changes: 5 additions & 2 deletions twittering-mode.el
Expand Up @@ -2904,8 +2904,11 @@ The return value is nil or a positive integer less than POS."
(unless (symbolp function)
(error (format "twittering-defcommand: `function' must be as symbol")))
(setq command (format "%s" command))
(add-to-list 'twittering-commands
(cons command function)))
(let ((entry (assoc command twittering-commands)))
(if entry
(setcdr entry function)
(add-to-list 'twittering-commands
(cons command function)))))

(defun twittering-command-prompt ()
(interactive)
Expand Down

0 comments on commit 8a7db54

Please sign in to comment.