diff options
Diffstat (limited to '')
-rw-r--r-- | emacs | 32 |
1 files changed, 20 insertions, 12 deletions
@@ -309,11 +309,11 @@ (global-set-key [f12] 'indent-region) ; Enable Doxygen syntax highlighting for C and C++ -(require 'doxymacs) -(add-hook 'font-lock-mode-hook - '(lambda () - (if (or (eq major-mode 'c-mode) (eq major-mode 'c++-mode)) - (doxymacs-font-lock)))) +(when (require 'doxymacs nil 'noerror) + (add-hook 'font-lock-mode-hook + '(lambda () + (if (or (eq major-mode 'c-mode) (eq major-mode 'c++-mode)) + (doxymacs-font-lock))))) ;; flyspell (with aspell for Unicode) (setq ispell-program-name "aspell") @@ -420,8 +420,10 @@ ;; copy/paste enhancements ; share clipboard with other X11-Apps -(setq x-select-enable-clipboard t) -(setq interprogram-paste-function 'x-cut-buffer-or-selection-value) +(when (fboundp 'x-cut-buffer-or-selection-value) + (progn + (setq x-select-enable-clipboard t) + (setq interprogram-paste-function 'x-cut-buffer-or-selection-value))) ;; use cua-mode, but only for rectangle selections (setq cua-enable-cua-keys nil) @@ -499,12 +501,18 @@ (require 'dir-locals) ;; use sml-modeline if available -(if (require 'sml-modeline nil 'noerror) +(when (require 'sml-modeline nil 'noerror) (progn - (sml-modeline-mode 1) ;; show buffer pos in the mode line - (scroll-bar-mode -1)) ;; turn off the scrollbar - (scroll-bar-mode 1) ;; otherwise, show a scrollbar... - (set-scroll-bar-mode 'right)) ;; ... on the right + ;; show buffer pos in the mode line + ;; and turn off the scrollbar + (sml-modeline-mode 1) + (when (fboundp 'scroll-bar-mode) (scroll-bar-mode -1))) + (when (fboundp 'scroll-bar-mode) + (progn + ;; otherwise, show a scrollbar... + ;; ... on the right + (scroll-bar-mode 1) + (set-scroll-bar-mode 'right)))) ;; browse-kill-ring (when (require 'browse-kill-ring nil 'noerror) |