emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/emulation/pc-select.el


From: Richard M. Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/emulation/pc-select.el
Date: Thu, 31 Jan 2002 22:59:17 -0500

Index: emacs/lisp/emulation/pc-select.el
diff -c emacs/lisp/emulation/pc-select.el:1.21 
emacs/lisp/emulation/pc-select.el:1.22
*** emacs/lisp/emulation/pc-select.el:1.21      Sat Jan 26 17:47:39 2002
--- emacs/lisp/emulation/pc-select.el   Thu Jan 31 22:59:17 2002
***************
*** 785,792 ****
    "Set VAR to NEWVAL; save the old value.
  The old value is saved on the `pc-select-saved-settings-alist'."
    `(when (boundp ',var)
!        (pc-select-add-to-alist pc-select-saved-settings-alist ,var ,var)
!        (setq ,var ,newval)))
  
  (defmacro pc-select-save-and-set-mode (mode &optional arg mode-var)
    "Call the function MODE; save the old value of the variable MODE.
--- 785,792 ----
    "Set VAR to NEWVAL; save the old value.
  The old value is saved on the `pc-select-saved-settings-alist'."
    `(when (boundp ',var)
!      (pc-select-add-to-alist pc-select-saved-settings-alist ,var ,var)
!      (setq ,var ,newval)))
  
  (defmacro pc-select-save-and-set-mode (mode &optional arg mode-var)
    "Call the function MODE; save the old value of the variable MODE.
***************
*** 796,807 ****
  nil as an argument.  If MODE-VAR is specified, save the value of the
  variable MODE-VAR (instead of the value of the variable MODE) on
  `pc-select-saved-settings-alist'."
!     `(when (fboundp ',mode)
!        (pc-select-add-to-alist pc-select-saved-settings-alist
!                               ,mode
!                               (or (and (boundp ',mode) ,mode)
!                                   ,mode-var))
!        (,mode ,arg)))
  
  (defmacro pc-select-restore-var (var)
    "Restore the previous value of the variable VAR. 
--- 796,806 ----
  nil as an argument.  If MODE-VAR is specified, save the value of the
  variable MODE-VAR (instead of the value of the variable MODE) on
  `pc-select-saved-settings-alist'."
!   (unless mode-var (setq mode-var mode))
!   `(when (fboundp ',mode)
!      (pc-select-add-to-alist pc-select-saved-settings-alist
!                            ,mode-var ,mode-var)
!      (,mode ,arg)))
  
  (defmacro pc-select-restore-var (var)
    "Restore the previous value of the variable VAR. 
***************
*** 821,827 ****
      `(when (fboundp ',mode)
         (let ((,elt (assq ',mode pc-select-saved-settings-alist)))
         (unless (null ,elt)
!        (,mode (if (cdr ,elt) 1 -1)))))))
  
  
  ;;;###autoload
--- 820,826 ----
      `(when (fboundp ',mode)
         (let ((,elt (assq ',mode pc-select-saved-settings-alist)))
         (unless (null ,elt)
!          (,mode (if (cdr ,elt) 1 -1)))))))
  
  
  ;;;###autoload



reply via email to

[Prev in Thread] Current Thread [Next in Thread]