comparison lisp/ediff-init.el @ 92493:402ee2cfca27

* bindings.el (mode-line-remote): Add mouse-face. Improve tooltip. (standard-mode-line-position): Add mouse-face. * progmodes/compile.el (compilation-menu-map): (compilation-mode-map): * progmodes/grep.el (grep-mode-map): Add :help. * emacs-lisp/lisp-mode.el (emacs-lisp-mode-map): Define and initialize in one step. Add :help. Use :enable to activate menu items. Show the key binding for edebug-defun. (lisp-interaction-mode-map): Add a menu. * term.el (term-mode-map): Define and initialize in one step. * ediff-init.el (ediff-color-display-p): Simplify. (Xor): Remove unused function. (ediff-with-syntax-table): Simplify for emacs. * ediff-hook.el (menu-bar-ediff-menu): Don't depend on the menu-bar being loaded, it always is.
author Dan Nicolaescu <dann@ics.uci.edu>
date Wed, 05 Mar 2008 04:09:24 +0000
parents 78ae33d192bf
children ee35c677f8f3
comparison
equal deleted inserted replaced
92492:dbef59debced 92493:402ee2cfca27
793 ((memq op '(< <=)) t)))) 793 ((memq op '(< <=)) t))))
794 794
795 795
796 (defun ediff-color-display-p () 796 (defun ediff-color-display-p ()
797 (condition-case nil 797 (condition-case nil
798 (ediff-cond-compile-for-xemacs-or-emacs 798 (if (featurep 'xemacs)
799 (eq (device-class (selected-device)) 'color) ; xemacs form 799 (eq (device-class (selected-device)) 'color) ; xemacs form
800 (if (fboundp 'display-color-p) ; emacs form 800 (display-color-p)) ; emacs form
801 (display-color-p)
802 (x-display-color-p))
803 )
804 (error nil))) 801 (error nil)))
805 802
806 803
807 ;; A var local to each control panel buffer. Indicates highlighting style 804 ;; A var local to each control panel buffer. Indicates highlighting style
808 ;; in effect for this buffer: `face', `ascii', 805 ;; in effect for this buffer: `face', `ascii',
1820 1817
1821 (defsubst ediff-show-all-diffs (n) 1818 (defsubst ediff-show-all-diffs (n)
1822 "Don't skip difference regions." 1819 "Don't skip difference regions."
1823 nil) 1820 nil)
1824 1821
1825 (defsubst Xor (a b)
1826 (or (and a (not b)) (and (not a) b)))
1827
1828 (defsubst ediff-message-if-verbose (string &rest args) 1822 (defsubst ediff-message-if-verbose (string &rest args)
1829 (if ediff-verbose-p 1823 (if ediff-verbose-p
1830 (apply 'message string args))) 1824 (apply 'message string args)))
1831 1825
1832 (defun ediff-file-attributes (filename attr-number) 1826 (defun ediff-file-attributes (filename attr-number)
1844 (defun ediff-convert-standard-filename (fname) 1838 (defun ediff-convert-standard-filename (fname)
1845 (if (fboundp 'convert-standard-filename) 1839 (if (fboundp 'convert-standard-filename)
1846 (convert-standard-filename fname) 1840 (convert-standard-filename fname)
1847 fname)) 1841 fname))
1848 1842
1849 1843 (if (featurep 'emacs)
1850 (if (fboundp 'with-syntax-table)
1851 (defalias 'ediff-with-syntax-table 'with-syntax-table) 1844 (defalias 'ediff-with-syntax-table 'with-syntax-table)
1852 ;; stolen from subr.el in emacs 21 1845 (if (fboundp 'with-syntax-table)
1853 (defmacro ediff-with-syntax-table (table &rest body) 1846 (defalias 'ediff-with-syntax-table 'with-syntax-table)
1854 (let ((old-table (make-symbol "table")) 1847 ;; stolen from subr.el in emacs 21
1855 (old-buffer (make-symbol "buffer"))) 1848 (defmacro ediff-with-syntax-table (table &rest body)
1856 `(let ((,old-table (syntax-table)) 1849 (let ((old-table (make-symbol "table"))
1857 (,old-buffer (current-buffer))) 1850 (old-buffer (make-symbol "buffer")))
1858 (unwind-protect 1851 `(let ((,old-table (syntax-table))
1859 (progn 1852 (,old-buffer (current-buffer)))
1860 (set-syntax-table (copy-syntax-table ,table)) 1853 (unwind-protect
1861 ,@body) 1854 (progn
1862 (save-current-buffer 1855 (set-syntax-table (copy-syntax-table ,table))
1863 (set-buffer ,old-buffer) 1856 ,@body)
1864 (set-syntax-table ,old-table))))))) 1857 (save-current-buffer
1858 (set-buffer ,old-buffer)
1859 (set-syntax-table ,old-table))))))))
1865 1860
1866 1861
1867 (provide 'ediff-init) 1862 (provide 'ediff-init)
1868 1863
1869 1864