Skip to content

Commit

Permalink
Merge pull request #285 from auto-complete/support-max-width
Browse files Browse the repository at this point in the history
Add customizable variable 'max-width' same as #202
  • Loading branch information
syohex committed Jan 27, 2014
2 parents 4c2a54d + cb180ef commit 648b5c7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions auto-complete.el
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,13 @@ a prefix doen't contain any upper case letters."
:type 'integer
:group 'auto-complete)

(defcustom ac-max-width nil
"Maximum width for auto-complete menu to have"
:type '(choice (const :tag "No limit" nil)
(const :tag "Character Limit" 25)
(const :tag "Window Ratio Limit" 0.5))
:group 'auto-complete)

(defface ac-completion-face
'((t (:foreground "darkgray" :underline t)))
"Face for inline completion"
Expand Down Expand Up @@ -797,6 +804,7 @@ You can not use it in source definition like (prefix . `NAME')."
(popup-create point width height
:around t
:face 'ac-candidate-face
:max-width ac-max-width
:mouse-face 'ac-candidate-mouse-face
:selection-face 'ac-selection-face
:symbol t
Expand Down

0 comments on commit 648b5c7

Please sign in to comment.