Skip to content

Commit

Permalink
Merge pull request 'Two more potential runtime issues.' (legoscia#25)…
Browse files Browse the repository at this point in the history
… from hdasch/emacs-jabber:illiterate into illiterate

Reviewed-on: https://codeberg.org/emacs-jabber/emacs-jabber/pulls/25
  • Loading branch information
contrapunctus committed Jun 14, 2023
2 parents d50dd76 + e3c8c59 commit e0e7b23
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
7 changes: 4 additions & 3 deletions elisp/jabber-muc-nick-completion.el
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ Optional argument GROUP to look."
(defun jabber-muc-beginning-of-line ()
"Return position of line begining."
(save-excursion
(if (looking-back jabber-muc-completion-delimiter)
(if (looking-back jabber-muc-completion-delimiter (line-beginning-position))
(backward-char (+ (length jabber-muc-completion-delimiter) 1)))
(skip-syntax-backward "^-")
(point)))
Expand Down Expand Up @@ -172,8 +172,9 @@ OLD is last tried nickname."
(jabber-muc-completion-delete-last-tried)
(progn
(insert subst)
(if (looking-back (concat "^" (regexp-quote (car he-expand-list))))
(unless (looking-back (concat "^" (regexp-quote (car he-expand-list)) jabber-muc-completion-delimiter))
(if (looking-back (concat "^" (regexp-quote (car he-expand-list))) nil)
(unless (looking-back (concat "^" (regexp-quote (car he-expand-list)) jabber-muc-completion-delimiter)
nil)
(insert jabber-muc-completion-delimiter))))))
(setq he-tried-table (cons (car he-expand-list) (cdr he-tried-table)))
(setq he-expand-list (cdr he-expand-list))
Expand Down
2 changes: 1 addition & 1 deletion elisp/jabber-presence.el
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ Show status properties from highest-priority resource."
(defun jabber-count-connected-resources (buddy)
"Return the number of connected resources for BUDDY."
(let ((resource-alist (get buddy 'resources))
(cl-count 0))
(count 0))
(dolist (resource resource-alist)
(if (plist-get (cdr resource) 'connected)
(setq count (1+ count))))
Expand Down
5 changes: 3 additions & 2 deletions elisp/jabber-sawfish.el
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ Sawfish window manager."
"Displays MESSAGE through the Sawfish window manager."
(let ((process-connection-type nil))
(start-process-shell-command
"jabber-sawfish" nil "echo"
(concat "'(progn (require (quote timers)) (display-message \""
"jabber-sawfish" nil
(concat "echo "
"'(progn (require (quote timers)) (display-message \""
(or title text)
"\")(make-timer (lambda () (display-message nil)) "
(number-to-string jabber-sawfish-display-time)
Expand Down
4 changes: 2 additions & 2 deletions elisp/jabber-tmux.el
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@

(eval-when-compile (require 'jabber-alert))

(defun jabber-tmux-message (msg)
(defun jabber-tmux-message (text &optional title)
"Show MSG in tmux"
(call-process "tmux" nil nil nil "display-message" msg))
(call-process "tmux" nil nil nil "display-message" (or title text)))

; Automatically defines jabber-{message,muc,presence,info}-tmux
; functions.
Expand Down
3 changes: 1 addition & 2 deletions elisp/jabber-widget.el
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ One of:
(t
(message "Making completion list...")
(with-output-to-temp-buffer "*Completions*"
(display-completion-list (all-completions prefix list nil)
prefix))
(display-completion-list (all-completions prefix list nil)))
(message "Making completion list...done")))))

(defun jabber-init-widget-buffer (submit-to)
Expand Down

0 comments on commit e0e7b23

Please sign in to comment.