]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/prog-mode.el
Merge from origin/emacs-25
[gnu-emacs] / lisp / progmodes / prog-mode.el
index d05e6369b865ed7f0f15e76e6ade1abed7e8b39d..718b33932eda18d0267fb0ce2842674989fa646d 100644 (file)
@@ -1,6 +1,6 @@
 ;;; prog-mode.el --- Generic major mode for programming  -*- lexical-binding: t -*-
 
-;; Copyright (C) 2013-2015 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2016 Free Software Foundation, Inc.
 
 ;; Maintainer: emacs-devel@gnu.org
 ;; Keywords: internal
@@ -136,15 +136,15 @@ Each element looks like (SYMBOL . CHARACTER), where the symbol
 matching SYMBOL (a string, not a regexp) will be shown as
 CHARACTER instead.
 
-CHARACTER can be a character or it can be a list or vector, in
+CHARACTER can be a character, or it can be a list or vector, in
 which case it will be used to compose the new symbol as per the
 third argument of `compose-region'.")
 
 (defun prettify-symbols-default-compose-p (start end _match)
   "Return true iff the symbol MATCH should be composed.
 The symbol starts at position START and ends at position END.
-This is default `prettify-symbols-compose-predicate' which is
-suitable for most programming languages such as C or Lisp."
+This is the default for `prettify-symbols-compose-predicate'
+which is suitable for most programming languages such as C or Lisp."
   ;; Check that the chars should really be composed into a symbol.
   (let* ((syntaxes-beg (if (memq (char-syntax (char-after start)) '(?w ?_))
                            '(?w ?_) '(?. ?\\)))
@@ -156,14 +156,14 @@ suitable for most programming languages such as C or Lisp."
 
 (defvar-local prettify-symbols-compose-predicate
   #'prettify-symbols-default-compose-p
-  "A predicate deciding if the currently matched symbol is to be composed.
+  "A predicate for deciding if the currently matched symbol is to be composed.
 The matched symbol is the car of one entry in `prettify-symbols-alist'.
-The predicate receives the match's start and end position as well
+The predicate receives the match's start and end positions as well
 as the match-string as arguments.")
 
 (defun prettify-symbols--compose-symbol (alist)
   "Compose a sequence of characters into a symbol.
-Regexp match data 0 points to the chars."
+Regexp match data 0 specifies the characters to be composed."
   ;; Check that the chars should really be composed into a symbol.
   (let ((start (match-beginning 0))
         (end (match-end 0))
@@ -202,6 +202,7 @@ is immediately after the symbol.  The prettification will be
 reapplied as soon as point moves away from the symbol.  If
 set to nil, the prettification persists even when point is
 on the symbol."
+  :version "25.1"
   :type '(choice (const :tag "Never unprettify" nil)
                  (const :tag "Unprettify when point is inside" t)
                  (const :tag "Unprettify when point is inside or at right edge" right-edge))