]> code.delx.au - gnu-emacs/blobdiff - lisp/cedet/mode-local.el
; Merge from origin/emacs-24
[gnu-emacs] / lisp / cedet / mode-local.el
index 7346e88797d7badb5b991b34b15ee0ecc7923ff6..35363337aee96cf5b539b9cac82c3d4a4a31f625 100644 (file)
@@ -1,6 +1,6 @@
 ;;; mode-local.el --- Support for mode local facilities
 ;;
-;; Copyright (C) 2004-2005, 2007-201 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2005, 2007-2015 Free Software Foundation, Inc.
 ;;
 ;; Author: David Ponce <david@dponce.com>
 ;; Maintainer: David Ponce <david@dponce.com>
@@ -522,6 +522,9 @@ See also the function `define-overload'."
         (list (mode-local--override name args body))
       result)))
 
+;;;###autoload
+(put 'define-overloadable-function 'doc-string-elt 3)
+
 (defmacro define-overloadable-function (name args docstring &rest body)
   "Define a new function, as with `defun', which can be overloaded.
 NAME is the name of the function to create.
@@ -546,6 +549,7 @@ defined.  The default is to call the function `NAME-default' with the
 appropriate arguments deduced from ARGS.
 OVERARGS is a list of arguments passed to the override and
 `NAME-default' function, in place of those deduced from ARGS."
+  (declare (doc-string 3))
   `(eval-and-compile
      (defun ,name ,args
        ,docstring
@@ -594,15 +598,16 @@ PROMPT, INITIAL, HIST, and DEFAULT are the same as for `completing-read'."
 (defun overload-docstring-extension (overload)
   "Return the doc string that augments the description of OVERLOAD."
   (let ((doc "\n\This function can be overloaded\
- with `define-mode-local-override'.")
+ with ‘define-mode-local-override’.")
         (sym (overload-obsoleted-by overload)))
     (when sym
-      (setq doc (format "%s\nIt has made the overload `%s' obsolete since %s."
+      (setq doc (format "%s\nIt has made the overload ‘%s’ obsolete since %s."
                         doc sym (get sym 'overload-obsoleted-since))))
     (setq sym (overload-that-obsolete overload))
     (when sym
-      (setq doc (format "%s\nThis overload is obsolete since %s;\nUse `%s' instead."
-                        doc (get overload 'overload-obsoleted-since) sym)))
+      (setq doc (format
+                 "%s\nThis overload is obsolete since %s;\nuse ‘%s’ instead."
+                 doc (get overload 'overload-obsoleted-since) sym)))
     doc))
 
 (defun mode-local-augment-function-help (symbol)
@@ -625,9 +630,9 @@ SYMBOL is a function that can be overridden."
 (defun mode-local-print-binding (symbol)
   "Print the SYMBOL binding."
   (let ((value (symbol-value symbol)))
-    (princ (format "\n     `%s' value is\n       " symbol))
+    (princ (format "\n     ‘%s’ value is\n       " symbol))
     (if (and value (symbolp value))
-        (princ (format "`%s'" value))
+        (princ (format "‘%s’" value))
       (let ((pt (point)))
         (pp value)
         (save-excursion
@@ -685,7 +690,7 @@ SYMBOL is a function that can be overridden."
       )
      ((symbolp buffer-or-mode)
       (setq mode buffer-or-mode)
-      (princ (format "`%s'\n" buffer-or-mode))
+      (princ (format "‘%s’\n" buffer-or-mode))
       )
      ((signal 'wrong-type-argument
               (list 'buffer-or-mode buffer-or-mode))))
@@ -695,7 +700,7 @@ SYMBOL is a function that can be overridden."
     (while mode
       (setq table (get mode 'mode-local-symbol-table))
       (when table
-        (princ (format "\n- From `%s'\n" mode))
+        (princ (format "\n- From ‘%s’\n" mode))
         (mode-local-print-bindings table))
       (setq mode (get-mode-local-parent mode)))))