abo-abo / ace-window

Quickly switch windows in Emacs
977 stars 87 forks source link

Error: "aw-window<: Symbol's function definition is void: frame-position" #136

Closed oantolin closed 6 years ago

oantolin commented 6 years ago

I'm guessing the frame-parameter function is new in some recent version of Emacs. It doesn't exist in Emacs 24.5.1 (which I'm forced to run at work, sadly).

If you want ace-window to work on those older Emacsen you could change the implemenation of ace-window< to use (frame-parameter f1 'left) in place of (car (frame-position f1)) and (frame-parameter f1 'top) in place of (cdr (frame-position f1)).

Currently as a shim I added this to my configuration:

(unless (fboundp 'frame-position)
 (defun frame-position (&optional frame)
   (cons (frame-parameter frame 'left)
         (frame-parameter frame 'top))))

That way I can use the current version of ace-window unchanged.

abo-abo commented 6 years ago

Thanks.