]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/glasses.el
Show returned value after gdb-mi "finish" command
[gnu-emacs] / lisp / progmodes / glasses.el
index 6792e861888031f09f37552cbfd9559ce71fec34..17f5ffd5118af7dafee9736eee5a93b5e1f2ad15 100644 (file)
@@ -1,6 +1,6 @@
 ;;; glasses.el --- make cantReadThis readable
 
-;; Copyright (C) 1999-201 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2016 Free Software Foundation, Inc.
 
 ;; Author: Milan Zamazal <pdm@zamazal.org>
 ;; Maintainer: Milan Zamazal <pdm@zamazal.org>
 ;;; Code:
 
 
-(eval-when-compile
-  (require 'cl))
-
-
 ;;; User variables
 
 
@@ -78,7 +74,7 @@ string."
 
 
 (defcustom glasses-original-separator "_"
-  "*String to be displayed as `glasses-separator' in separator positions.
+  "String to be displayed as `glasses-separator' in separator positions.
 For instance, if you set it to \"_\" and set `glasses-separator' to \"-\",
 underscore separators are displayed as hyphens.
 If `glasses-original-separator' is an empty string, no such display change is
@@ -256,7 +252,7 @@ CATEGORY is the overlay category.  If it is nil, use the `glasses' category."
        ;; Parentheses
        (when glasses-separate-parentheses-p
          (goto-char beg)
-         (while (re-search-forward "[a-zA-Z]_*\\(\(\\)" end t)
+         (while (re-search-forward "[a-zA-Z]_*\\((\\)" end t)
            (unless (glasses-parenthesis-exception-p (point-at-bol) (match-end 1))
              (glasses-make-overlay (match-beginning 1) (match-end 1)
                                    'glasses-parenthesis))))))))
@@ -295,7 +291,7 @@ recognized according to the current value of the variable `glasses-separator'."
              (goto-char (match-beginning 1)))))
        (when glasses-separate-parentheses-p
          (goto-char (point-min))
-         (while (re-search-forward "[a-zA-Z]_*\\( \\)\(" nil t)
+         (while (re-search-forward "[a-zA-Z]_*\\( \\)(" nil t)
            (unless (glasses-parenthesis-exception-p (point-at-bol) (1+ (match-end 1)))
              (replace-match "" t nil nil 1)))))))
   ;; nil must be returned to allow use in write file hooks
@@ -316,8 +312,10 @@ recognized according to the current value of the variable `glasses-separator'."
 ;;;###autoload
 (define-minor-mode glasses-mode
   "Minor mode for making identifiers likeThis readable.
-When this mode is active, it tries to add virtual separators (like underscores)
-at places they belong to."
+With a prefix argument ARG, enable the mode if ARG is positive,
+and disable it otherwise.  If called from Lisp, enable the mode
+if ARG is omitted or nil.  When this mode is active, it tries to
+add virtual separators (like underscores) at places they belong to."
   :group 'glasses :lighter " o^o"
   (save-excursion
     (save-restriction