comparison lisp/emulation/viper-util.el @ 12204:a7bd91d4af97

(vip-over-whitespace-line): new function.
author Karl Heuer <kwzh@gnu.org>
date Tue, 13 Jun 1995 21:20:59 +0000
parents e16c06646396
children 5ab666b86a02
comparison
equal deleted inserted replaced
12203:0078571e5330 12204:a7bd91d4af97
18 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 18 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
19 19
20 (require 'ring) 20 (require 'ring)
21 21
22 ;; Whether it is XEmacs or not 22 ;; Whether it is XEmacs or not
23 (defconst vip-xemacs-p (string-match "\\(Lucid\\|Xemacs\\)" emacs-version)) 23 (defconst vip-xemacs-p (string-match "\\(Lucid\\|XEmacs\\)" emacs-version))
24 ;; Whether it is Emacs or not 24 ;; Whether it is Emacs or not
25 (defconst vip-emacs-p (not vip-xemacs-p)) 25 (defconst vip-emacs-p (not vip-xemacs-p))
26 ;; Tell whether we are running as a window application or on a TTY 26 ;; Tell whether we are running as a window application or on a TTY
27 (defsubst vip-device-type () 27 (defsubst vip-device-type ()
28 (if vip-emacs-p 28 (if vip-emacs-p
477 (cond ((null truncated-str) "") 477 (cond ((null truncated-str) "")
478 ((> (length string) max-len) 478 ((> (length string) max-len)
479 (format "%s%s%s%s" 479 (format "%s%s%s%s"
480 pre-string truncated-str abbrev-sign post-string)) 480 pre-string truncated-str abbrev-sign post-string))
481 (t (format "%s%s%s" pre-string truncated-str post-string))))) 481 (t (format "%s%s%s" pre-string truncated-str post-string)))))
482
483 ;; tells if we are over a whitespace-only line
484 (defsubst vip-over-whitespace-line ()
485 (save-excursion
486 (beginning-of-line)
487 (looking-at "^[ \t]*$")))
482 488
483 489
484 ;;; Saving settings in custom file 490 ;;; Saving settings in custom file
485 491
486 ;; Save the current setting of VAR in CUSTOM-FILE. 492 ;; Save the current setting of VAR in CUSTOM-FILE.