[PATCH v2] emacs: Improved compatibility for window-body-width in Emacs < 24
Austin Clements writes: > 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. pushed. d
Re: [PATCH v2] emacs: Improved compatibility for window-body-width in Emacs 24
Austin Clements amdra...@mit.edu writes: 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. pushed. d ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
[PATCH v2] emacs: Improved compatibility for window-body-width in Emacs < 24
On Fri, Aug 08 2014, Austin Clements wrote: > 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. > --- > > Tomi pointed out that window-body-width simply used to be called > window-width, so this simplifies the wrapper to a defalias. LGTM. Tested w/ (notmuch-jump nil "foo") in emacs 23.1.1 -- call failed but after calling (window-body-width). Tomi > > emacs/notmuch-jump.el | 10 -- > 1 file changed, 4 insertions(+), 6 deletions(-) > > diff --git a/emacs/notmuch-jump.el b/emacs/notmuch-jump.el > index 05bbce5..5eb0949 100644 > --- a/emacs/notmuch-jump.el > +++ b/emacs/notmuch-jump.el > @@ -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 @@ (defun notmuch-jump--make-keymap (action-map) > (setq notmuch-jump--action ',(third action)) > (exit-minibuffer > map)) > - > -(unless (fboundp 'window-body-width) > - ;; Compatibility for Emacs pre-24 > - (defun window-body-width ( window) > -(let ((edges (window-inside-edges window))) > - (- (caddr edges) (car edges) > -- > 2.0.0 > > ___ > notmuch mailing list > notmuch at notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH v2] emacs: Improved compatibility for window-body-width in Emacs 24
On Fri, Aug 08 2014, Austin Clements amdra...@mit.edu wrote: 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. --- Tomi pointed out that window-body-width simply used to be called window-width, so this simplifies the wrapper to a defalias. LGTM. Tested w/ (notmuch-jump nil foo) in emacs 23.1.1 -- call failed but after calling (window-body-width). Tomi emacs/notmuch-jump.el | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/emacs/notmuch-jump.el b/emacs/notmuch-jump.el index 05bbce5..5eb0949 100644 --- a/emacs/notmuch-jump.el +++ b/emacs/notmuch-jump.el @@ -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 @@ (defun notmuch-jump--make-keymap (action-map) (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) -- 2.0.0 ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
[PATCH v2] 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. --- Tomi pointed out that window-body-width simply used to be called window-width, so this simplifies the wrapper to a defalias. emacs/notmuch-jump.el | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/emacs/notmuch-jump.el b/emacs/notmuch-jump.el index 05bbce5..5eb0949 100644 --- a/emacs/notmuch-jump.el +++ b/emacs/notmuch-jump.el @@ -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 @@ (defun notmuch-jump--make-keymap (action-map) (setq notmuch-jump--action ',(third action)) (exit-minibuffer map)) - -(unless (fboundp 'window-body-width) - ;; Compatibility for Emacs pre-24 - (defun window-body-width ( window) -(let ((edges (window-inside-edges window))) - (- (caddr edges) (car edges) -- 2.0.0
[PATCH v2] 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. --- Tomi pointed out that window-body-width simply used to be called window-width, so this simplifies the wrapper to a defalias. emacs/notmuch-jump.el | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/emacs/notmuch-jump.el b/emacs/notmuch-jump.el index 05bbce5..5eb0949 100644 --- a/emacs/notmuch-jump.el +++ b/emacs/notmuch-jump.el @@ -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 @@ (defun notmuch-jump--make-keymap (action-map) (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) -- 2.0.0 ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch