mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-25 19:04:53 +01:00
emacs: Improved compatibility for window-body-width in Emacs < 24
Fix byte compiler warning "Warning: the function `window-body-width' is not known to be defined." by moving our compatibility wrapper before its use and simplify the definition to a defalias for the old name of the function.
This commit is contained in:
parent
f92342cb76
commit
c1845bf0a4
1 changed files with 4 additions and 6 deletions
|
@ -25,6 +25,10 @@
|
|||
(require 'notmuch-lib)
|
||||
(require 'notmuch-hello)
|
||||
|
||||
(unless (fboundp 'window-body-width)
|
||||
;; Compatibility for Emacs pre-24
|
||||
(defalias 'window-body-width 'window-width))
|
||||
|
||||
;;;###autoload
|
||||
(defun notmuch-jump-search ()
|
||||
"Jump to a saved search by shortcut key.
|
||||
|
@ -165,9 +169,3 @@ buffer."
|
|||
(setq notmuch-jump--action ',(third action))
|
||||
(exit-minibuffer))))
|
||||
map))
|
||||
|
||||
(unless (fboundp 'window-body-width)
|
||||
;; Compatibility for Emacs pre-24
|
||||
(defun window-body-width (&optional window)
|
||||
(let ((edges (window-inside-edges window)))
|
||||
(- (caddr edges) (car edges)))))
|
||||
|
|
Loading…
Reference in a new issue