~a-roehler/s-x-emacs-werkstatt/GNU-Emacs-footnote.diff

« back to all changes in this revision

Viewing changes to misc-utils.el

  • Committer: Andreas Roehler
  • Date: 2009-08-26 08:21:40 UTC
  • Revision ID: andreas.roehler@online.de-20090826082140-gfix98o8aonomft9
use region-active-p

Show diffs side-by-side

added added

removed removed

Lines of Context:
106
106
 
107
107
;; redefining it here as existing function returs false positives
108
108
;; with GNU Emacs 23.1.50.1 (i686-pc-linux-gnu, GTK+ Version 2.12.0) of 2009-07-25 
109
 
;; (unless (featurep 'xemacs)
110
 
;; ;; (unless (functionp 'region-exists-p)
111
 
;; (defun region-exists-p ()
112
 
;; "and mark-active transient-mark-mode
113
 
;; (not (eq (region-beginning) (region-end)"
114
 
;; (and mark-active transient-mark-mode
115
 
;; (not (eq (condition-case nil (region-beginning)(error nil))  (condition-case nil (region-end) (error nil)))))))
 
109
(unless (featurep 'xemacs)
 
110
  (defun region-active-p ()
 
111
    "and mark-active transient-mark-mode
 
112
 (not (eq (region-beginning) (region-end)"
 
113
    (and mark-active transient-mark-mode
 
114
         (not (eq (condition-case nil (region-beginning)(error nil)) (condition-case nil (region-end) (error nil)))))))
116
115
 
117
116
(unless (functionp 'indent-with-spaces)
118
117
  (defun indent-with-spaces (column)