In Emacs 23, evaluating
(x-display-pixel-width)
yielded the width of the current window.
In Emacs 24 the same expression returns the combined width of all windows.
How does one return the width of just the main/current window while evaluating the related, but new and improved, function
(display-monitor-attributes-list)
?
Take a look at
display-monitor-attribute-list:For example, to find the width of the first monitor, you could use: