Pascal J. Bourguignon [2018-03-31 21:35]
diff --git a/pjb-advices.el b/pjb-advices.el
index c1d6b99..60e86a5 100644
--- a/pjb-advices.el
+++ b/pjb-advices.el
@@ -197,7 +197,7 @@ Email addresses are not case sensitive."
       (unless (eq window-system 'w32)
         (if focus-follows-mouse
-            (set-mouse-position (selected-frame) (1- (frame-width)) 0)
+            (set-mouse-position (selected-frame) (1- (pjb-frame-width)) 0)
             (redirect-frame-focus original-frame (selected-frame))))))
   (ad-activate 'other-frame))

@@ -392,4 +392,3 @@ delete any existing frames that the frame configuration doesn't mention.

 ;; (provide 'pjb-advices)
 ;;;; THE END ;;;;
diff --git a/pjb-emacs.el b/pjb-emacs.el
index e741d54..750336a 100644
--- a/pjb-emacs.el
+++ b/pjb-emacs.el
@@ -53,7 +53,7 @@

-(defvar html-quick-keys t )
+(defvar html-quick-keys t)
 (defvar html-mode-map
   (let ((map (nconc (make-sparse-keymap) sgml-mode-map))
         (menu-map (make-sparse-keymap "HTML")))
@@ -1278,7 +1278,7 @@ RETURN: The origin and width and height of the screen where the frame lies,

 (defvar *frame-maximized-states*)

-;; (list (frame-pixel-left) (frame-pixel-top) (frame-width) (frame-height))
+;; (list (frame-pixel-left) (frame-pixel-top) (pjb-frame-width) (pjb-frame-height))
 ;; (0 (+ -23) 179 78)

@@ -1574,8 +1574,8 @@ only display one window with the scratch buffer"
          (screen-height (fourth area))
          (other-frames  (remove-if
                          (lambda (fr) (or (eq fr frame)
-                                     (not (equal (frame-display fr)
-                                                 (frame-display frame)))))
+                                     (not (equal (pjb-frame-display fr)
+                                                 (pjb-frame-display frame)))))
     (select-frame frame)
     (case (length other-frames)
@@ -1624,10 +1624,10 @@ only display one window with the scratch buffer"
                  nil ; no repeat
                  (lambda () ; a closure, thanks to lexical-binding above :-)
                    (toggle-tool-bar-mode-from-frame +1)
-                   (set-frame-size frame (1- (frame-width frame)) (1- (frame-height frame)))
+                   (set-frame-size frame (1- (pjb-frame-width frame)) (1- (pjb-frame-height frame)))
                    (forward-font -1)
                    (forward-font +1)
-                   (set-frame-size frame (1+ (frame-width frame)) (1+ (frame-height frame)))
+                   (set-frame-size frame (1+ (pjb-frame-width frame)) (1+ (pjb-frame-height frame)))
                    (toggle-tool-bar-mode-from-frame -1)))))

 (when (eq window-system 'ns)
diff --git a/pjb-xresources.el b/pjb-xresources.el
index d518e72..021a805 100644
--- a/pjb-xresources.el
+++ b/pjb-xresources.el
@@ -42,7 +42,7 @@ RETURN: The current frame.

 (defmacro define-frame-parameter (name)
-  `(defun ,(intern (format "frame-%s" name)) (&optional frame)
+  `(defun ,(intern (format "pjb-frame-%s" name)) (&optional frame)
      (frame-parameter (or frame (selected-frame)) ',name)))

 ;; (dolist (p (frame-parameters)) (insert (format "(define-frame-parameter %s)\n" (car p))))
@@ -92,8 +92,8 @@ RETURN: The current frame.
 (define-frame-parameter font)

-(defalias 'frame-pixel-top  'frame-top)
-(defalias 'frame-pixel-left 'frame-left)
+(defalias 'pjb-frame-pixel-top  'pjb-frame-top)
+(defalias 'pjb-frame-pixel-left 'pjb-frame-left)

 (defun set-default-frame-parameter (name value)
@@ -104,15 +104,15 @@ RETURN: The current frame.

-(defun frame-geometry (&optional frame)
+(defun pjb-frame-geometry (&optional frame)
   "Return the position and size of the `frame' as an X geometry specification string."
   (let ((frame (or frame (current-frame))))
     (format "%dx%d-%d+%d"
-            (frame-width frame) (frame-height frame)
+            (pjb-frame-width frame) (pjb-frame-height frame)
             (frame-pixel-left frame) (frame-pixel-top frame))))

-(defun frame-full-screen (&optional frame)
+(defun pjb-frame-full-screen (&optional frame)
   "Return the full-screen X resource parameter for the `frame'."
   (let* ((frame    (or frame (current-frame)))
          (fwidth   (frame-pixel-width))
@@ -176,38 +176,38 @@ RETURN: The current frame.
-    ("*background"     (frame-background-color))
-    ("*bitmapIcon"     (on-off (frame-icon-name)))
-    ("*borderColor"    (frame-border-color))
-    ("*borderWidth"    (frame-border-width))
-    ("*cursorColor"    (frame-cursor-color))
+    ("*background"     (pjb-frame-background-color))
+    ("*bitmapIcon"     (on-off (pjb-frame-icon-name)))
+    ("*borderColor"    (pjb-frame-border-color))
+    ("*borderWidth"    (pjb-frame-border-width))
+    ("*cursorColor"    (pjb-frame-cursor-color))
     ("*cursorBlink"    (on-off blink-cursor))
-    ("*font"           (frame-font))
+    ("*font"           (pjb-frame-font))
     ("*fontBackend"    :unset)
-    ("*foreground"     (frame-foreground-color))
-    ("*geometry"       (frame-geometry))
-    ("*fullscreen"     (or-unset (frame-full-screen)))
-    ("*iconName"       (or-unset (frame-icon-name)))
-    ("*internalBorder" (frame-internal-border-width))
-    ("*lineSpacing"    (or-unset (frame-line-spacing)))
+    ("*foreground"     (pjb-frame-foreground-color))
+    ("*geometry"       (pjb-frame-geometry))
+    ("*fullscreen"     (or-unset (pjb-frame-full-screen)))
+    ("*iconName"       (or-unset (pjb-frame-icon-name)))
+    ("*internalBorder" (pjb-frame-internal-border-width))
+    ("*lineSpacing"    (or-unset (pjb-frame-line-spacing)))
     ("*menuBar"        (on-off menu-bar-mode))
-    ("*minibuffer"     (if (frame-minibuffer) :unset "none"))
+    ("*minibuffer"     (if (pjb-frame-minibuffer) :unset "none"))
     ("*paneFont"       :unset) ; how to get it?    Font name for menu pane titles, in non-toolkit versions of Emacs.
-    ("*pointerColor"   (frame-mouse-color))
+    ("*pointerColor"   (pjb-frame-mouse-color))
     ("*privateColormap" :unset) ;  If ‘on’, use a private color map, in the case where the “default visual” of class PseudoColor and Emacs is using it.
     ("*reverseVideo"   (on-off (cdr (or (assq 'reverse (frame-parameters))
                                        (assq 'reverse default-frame-alist)))))
-    ("*screenGamma"    (or-unset (frame-screen-gamma)))
-    ("*scrollBarWidth" (frame-scroll-bar-width))
+    ("*screenGamma"    (or-unset (pjb-frame-screen-gamma)))
+    ("*scrollBarWidth" (pjb-frame-scroll-bar-width))
     ("*selectionFont" :unset) ;  Font name for pop-up menu items, in non-toolkit versions of Emacs. (For toolkit versions, see Lucid Resources, also see LessTif  Resources.)
     ("*selectionTimeout" :unset) ; Number of milliseconds to wait for a selection reply. If the selection owner doesn't reply in this time, we give up. A value of 0  means wait as long as necessary.
     ("*synchronous" :unset) ; Run Emacs in synchronous mode if ‘on’. Synchronous mode is useful for debugging X problems.
-    ("*title"       (or (frame-title) (frame-name)))
+    ("*title"       (or (pjb-frame-title) (pjb-frame-name)))
     ("*toolBar" (if top-toolbar
     ("*useXIM"  :unset) ; Turn off use of X input methods (XIM) if ‘false’ or ‘off’. This is only relevant if your Emacs is actually built with XIM support.  It is potentially useful to turn off XIM for efficiency, especially slow X client/server links.
-    ("*verticalScrollBars" (on-off (frame-vertical-scroll-bars)))
+    ("*verticalScrollBars" (on-off (pjb-frame-vertical-scroll-bars)))
     ("*visualClass"        (or-unset (x-display-visual-class))))
     ("*font"              (face-font 'menu))