A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://emacs.stackexchange.com/questions/84914/frame-size-adjustment-by-text-scale below:

buffers - Frame size adjustment by text scale

Have been setting frame dimensions, but the values are in terms of specific fonts, irrespective of the text scale mode. Thus if I want to expand to 80 characters, the frame is too small for a +3 scale mode.

I would like to make the frame of size 80 characters for a particular scale. For instance, setting emacs with text scaling +3 The frame size is set when making it, but does not have to change when the user scales

How could I adapt this to handle possible text scale.

(defvar qdesc-dimensions '((width . 80) (height . 32))
  "Global variable to store width and height as a list of dotted pairs.")

(defun qdesc (function)
  "Show the documentation for FUNCTION in a new Emacs frame."

  (interactive (list (function-called-at-point)))

  (let* ( (width  (cdr (assoc 'width  qdesc-dimensions)))
          (height (cdr (assoc 'height qdesc-dimensions)))
          (help-frame  (make-frame `((name . "Help")
                                     (width . ,width)
                                     (height . ,height)))) )
    (with-selected-frame help-frame
      (switch-to-buffer "*Help*")
      (describe-function function)
      (delete-other-windows))))

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4