commit/XEmacs: 4 new changesets

[email protected]
Newsgroups gmane.emacs.xemacs.patches
Message-ID <[email protected]>
4 new commits in XEmacs:

https://bitbucket.org/xemacs/xemacs/commits/10395934b99e/
Changeset:   10395934b99e
User:        sperber
Date:        2014-01-27 17:41:46
Summary:     Add :risky and :safe options to defcustom.

2014-01-27  Michael Sperber  <[email protected]>

	* custom.el (custom-declare-variable, defcustom): Add :risky and
	:safe options
Affected #:  2 files

diff -r 6355de501637068fe0e77e23640d3763708b285f -r 10395934b99efc079f15a3a1bcc280b598dbc118 lisp/ChangeLog
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2014-01-27  Michael Sperber  <[email protected]>
+
+	* custom.el (custom-declare-variable, defcustom): Add :risky and
+	:safe options
+
 2013-12-30  Byrel Mitchell <[email protected]>
 
 	* menubar.el (add-menu-item-1, delete-menu-item): Do not assume

diff -r 6355de501637068fe0e77e23640d3763708b285f -r 10395934b99efc079f15a3a1bcc280b598dbc118 lisp/custom.el
--- a/lisp/custom.el
+++ b/lisp/custom.el
@@ -178,6 +178,10 @@
 		 (put symbol 'custom-get value))
 		((eq keyword :require)
 		 (push value requests))
+		((eq keyword :risky)
+		 (put symbol 'risky-local-variable value))
+		((eq keyword :safe)
+		 (put symbol 'safe-local-variable value))
 		((eq keyword :type)
 		 (put symbol 'custom-type value))
 		((eq keyword :options)
@@ -264,6 +268,8 @@
 	VALUE should be a feature symbol.  If you save a value
 	for this option, then when your custom init file loads the value,
 	it does (require VALUE) first.
+:risky  Set SYMBOL's `risky-local-variable' property to VALUE.
+:safe   Set SYMBOL's `safe-local-variable' property to VALUE.
 :version
         VALUE should be a string specifying that the variable was
         first introduced, or its default value was changed, in Emacs


https://bitbucket.org/xemacs/xemacs/commits/6a6c89b53c5d/
Changeset:   6a6c89b53c5d
User:        sperber
Date:        2014-01-27 17:45:03
Summary:     Add `check-parents' from GNU Emacs.

2014-01-27  Michael Sperber  <[email protected]>

	* lisp.el (check-parens): Add, from GNU Emacs.
Affected #:  2 files

diff -r 10395934b99efc079f15a3a1bcc280b598dbc118 -r 6a6c89b53c5d33f6458cb2b3a8b7c1fab6922ea6 lisp/ChangeLog
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
+2014-01-27  Michael Sperber  <[email protected]>
+
+	* lisp.el (check-parens): Add, from GNU Emacs.
+	
 2014-01-27  Michael Sperber  <[email protected]>
 
 	* custom.el (custom-declare-variable, defcustom): Add :risky and

diff -r 10395934b99efc079f15a3a1bcc280b598dbc118 -r 6a6c89b53c5d33f6458cb2b3a8b7c1fab6922ea6 lisp/lisp.el
--- a/lisp/lisp.el
+++ b/lisp/lisp.el
@@ -328,6 +328,26 @@
     (delete-indentation))
   (forward-char 1)
   (newline-and-indent))
+
+(defun check-parens ()			; lame name?
+  "Check for unbalanced parentheses in the current buffer.
+More accurately, check the narrowed part of the buffer for unbalanced
+expressions (\"sexps\") in general.  This is done according to the
+current syntax table and will find unbalanced brackets or quotes as
+appropriate.  (See Info node `(emacs)Parentheses'.)  If imbalance is
+found, an error is signaled and point is left at the first unbalanced
+character."
+  (interactive)
+  (condition-case data
+      ;; Buffer can't have more than (point-max) sexps.
+      (scan-sexps (point-min) (point-max))
+    (scan-error (goto-char (nth 2 data))
+		;; Could print (nth 1 data), which is either
+		;; "Containing expression ends prematurely" or
+		;; "Unbalanced parentheses", but those may not be so
+		;; accurate/helpful, e.g. quotes may actually be
+		;; mismatched.
+  		(error "Unmatched bracket or quote"))))
 
 (defun lisp-complete-symbol ()
   "Perform completion on Lisp symbol preceding point.


https://bitbucket.org/xemacs/xemacs/commits/72c5d36ba3b6/
Changeset:   72c5d36ba3b6
User:        sperber
Date:        2014-01-27 17:50:57
Summary:     Make `define-function' accept docstring, as in GNU Emacs.

2014-01-27  Michael Sperber  <[email protected]>

	* symbols.c (Fdefine_function): Allow optional `docstring'
	argument, as in GNU Emacs.

	* lisp.h (Qfunction_documentation): Add extern declaration.

	* doc.c (Fdocumentation_property): Move before its use.
	(Fdocumentation): Retrieve documentation from `define-function'
	docstring for symbols.
Affected #:  4 files

diff -r 6a6c89b53c5d33f6458cb2b3a8b7c1fab6922ea6 -r 72c5d36ba3b6f3cbe871e3b26e50ea793f1cd598 src/ChangeLog
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,14 @@
+2014-01-27  Michael Sperber  <[email protected]>
+
+	* symbols.c (Fdefine_function): Allow optional `docstring'
+	argument, as in GNU Emacs.
+
+	* lisp.h (Qfunction_documentation): Add extern declaration.
+
+	* doc.c (Fdocumentation_property): Move before its use.
+	(Fdocumentation): Retrieve documentation from `define-function'
+	docstring for symbols.
+
 2014-01-23  Aidan Kehoe  <[email protected]>
 
 	* text.h (buffered_bytecount_to_charcount): This was

diff -r 6a6c89b53c5d33f6458cb2b3a8b7c1fab6922ea6 -r 72c5d36ba3b6f3cbe871e3b26e50ea793f1cd598 src/doc.c
--- a/src/doc.c
+++ b/src/doc.c
@@ -37,6 +37,8 @@
 
 Lisp_Object QSsubstitute, Qdefvar;
 
+Lisp_Object Qfunction_documentation;
+
 /* Work out what source file a function or variable came from, taking the
    information from the documentation file. */
 
@@ -578,6 +580,45 @@
   return Qnil;
 }
 
+DEFUN ("documentation-property", Fdocumentation_property, 2, 3, 0, /*
+Return the documentation string that is SYMBOL's PROP property.
+This is like `get', but it can refer to strings stored in the
+`doc-directory/DOC' file; and if the value is a string, it is passed
+through `substitute-command-keys'.  A non-nil third argument avoids this
+translation.
+*/
+       (symbol, prop, raw))
+{
+  /* This function can GC */
+  Lisp_Object doc = Qnil;
+#ifdef I18N3
+  REGISTER Lisp_Object domain;
+#endif
+  struct gcpro gcpro1;
+
+  GCPRO1 (doc);
+
+  doc = Fget (symbol, prop, Qnil);
+  if (FIXNUMP (doc))
+    doc = get_doc_string (XFIXNUM (doc) > 0 ? doc : make_fixnum (- XFIXNUM (doc)));
+  else if (CONSP (doc))
+    doc = get_doc_string (doc);
+#ifdef I18N3
+  if (!NILP (doc))
+    {
+      domain = Fget (symbol, Qvariable_domain, Qnil);
+      if (NILP (domain))
+	doc = Fgettext (doc);
+      else
+	doc = Fdgettext (domain, doc);
+    }
+#endif
+  if (NILP (raw) && STRINGP (doc))
+    doc = Fsubstitute_command_keys (doc);
+  UNGCPRO;
+  return doc;
+}
+
 DEFUN ("documentation", Fdocumentation, 1, 2, 0, /*
 Return the documentation string of FUNCTION.
 Unless a non-nil second argument RAW is given, the
@@ -589,6 +630,14 @@
   Lisp_Object fun;
   Lisp_Object doc;
 
+  if (SYMBOLP (function))
+    {
+      Lisp_Object tem = Fget (function, Qfunction_documentation, Qnil);
+      if (!NILP (tem))
+	return Fdocumentation_property (function, Qfunction_documentation,
+					raw);
+    }
+
   fun = Findirect_function (function);
 
   if (SUBRP (fun))
@@ -678,45 +727,6 @@
     }
   return doc;
 }
-
-DEFUN ("documentation-property", Fdocumentation_property, 2, 3, 0, /*
-Return the documentation string that is SYMBOL's PROP property.
-This is like `get', but it can refer to strings stored in the
-`doc-directory/DOC' file; and if the value is a string, it is passed
-through `substitute-command-keys'.  A non-nil third argument avoids this
-translation.
-*/
-       (symbol, prop, raw))
-{
-  /* This function can GC */
-  Lisp_Object doc = Qnil;
-#ifdef I18N3
-  REGISTER Lisp_Object domain;
-#endif
-  struct gcpro gcpro1;
-
-  GCPRO1 (doc);
-
-  doc = Fget (symbol, prop, Qnil);
-  if (FIXNUMP (doc))
-    doc = get_doc_string (XFIXNUM (doc) > 0 ? doc : make_fixnum (- XFIXNUM (doc)));
-  else if (CONSP (doc))
-    doc = get_doc_string (doc);
-#ifdef I18N3
-  if (!NILP (doc))
-    {
-      domain = Fget (symbol, Qvariable_domain, Qnil);
-      if (NILP (domain))
-	doc = Fgettext (doc);
-      else
-	doc = Fdgettext (domain, doc);
-    }
-#endif
-  if (NILP (raw) && STRINGP (doc))
-    doc = Fsubstitute_command_keys (doc);
-  UNGCPRO;
-  return doc;
-}
 
 
 DEFUN ("Snarf-documentation", Fsnarf_documentation, 1, 1, 0, /*
@@ -1299,6 +1309,7 @@
   DEFSUBR (Fsubstitute_command_keys);
 
   DEFSYMBOL (Qdefvar);
+  DEFSYMBOL (Qfunction_documentation);
 }
 
 void

diff -r 6a6c89b53c5d33f6458cb2b3a8b7c1fab6922ea6 -r 72c5d36ba3b6f3cbe871e3b26e50ea793f1cd598 src/lisp.h
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -4619,6 +4619,8 @@
 /* Defined in doc.c */
 EXFUN (Fsubstitute_command_keys, 1);
 
+extern Lisp_Object Qfunction_documentation;
+
 Lisp_Object unparesseuxify_doc_string (int fd, EMACS_INT position,
 				       Ibyte *name_nonreloc,
 				       Lisp_Object name_reloc,

diff -r 6a6c89b53c5d33f6458cb2b3a8b7c1fab6922ea6 -r 72c5d36ba3b6f3cbe871e3b26e50ea793f1cd598 src/symbols.c
--- a/src/symbols.c
+++ b/src/symbols.c
@@ -749,14 +749,14 @@
 }
 
 /* FSFmacs */
-DEFUN ("define-function", Fdefine_function, 2, 2, 0, /*
+DEFUN ("define-function", Fdefine_function, 2, 3, 0, /*
 Set SYMBOL's function definition to NEWDEF, and return NEWDEF.
 Associates the function with the current load file, if any.
 If NEWDEF is a compiled-function object, stores the function name in
 the `annotated' slot of the compiled-function (retrievable using
 `compiled-function-annotation').
 */
-       (symbol, newdef))
+       (symbol, newdef, docstring))
 {
   /* This function can GC */
   Ffset (symbol, newdef);
@@ -765,6 +765,10 @@
   if (COMPILED_FUNCTIONP (newdef))
     XCOMPILED_FUNCTION (newdef)->annotated = symbol;
 #endif /* COMPILED_FUNCTION_ANNOTATION_HACK */
+
+  if (!NILP (docstring))
+    Fput (symbol, Qfunction_documentation, docstring);
+
   return newdef;
 }
 


https://bitbucket.org/xemacs/xemacs/commits/dcf9067f26bb/
Changeset:   dcf9067f26bb
User:        sperber
Date:        2014-01-27 17:52:33
Summary:     Add font-lock-regexp-grouping-{backslash, construct} from GNU Emacs.

2014-01-27  Michael Sperber  <[email protected]>

	* font-lock.el (font-lock-regexp-grouping-backslash,
	font-lock-regexp-grouping-construct): Add these, as in GNU Emacs.
Affected #:  2 files

diff -r 72c5d36ba3b6f3cbe871e3b26e50ea793f1cd598 -r dcf9067f26bb2893d93f82299cb129664d61bd99 lisp/ChangeLog
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2014-01-27  Michael Sperber  <[email protected]>
+
+	* font-lock.el (font-lock-regexp-grouping-backslash,
+	font-lock-regexp-grouping-construct): Add these, as in GNU Emacs.
+
 2014-01-27  Michael Sperber  <[email protected]>
 
 	* lisp.el (check-parens): Add, from GNU Emacs.

diff -r 72c5d36ba3b6f3cbe871e3b26e50ea793f1cd598 -r dcf9067f26bb2893d93f82299cb129664d61bd99 lisp/font-lock.el
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -737,7 +737,9 @@
     font-lock-constant-face
     font-lock-reference-face
     font-lock-preprocessor-face
-    font-lock-warning-face))
+    font-lock-warning-face
+    font-lock-regexp-grouping-backslash
+    font-lock-regexp-grouping-construct))
 
 (defface font-lock-comment-face
   '((((class color) (background dark)) (:foreground "gray80"))
@@ -859,6 +861,16 @@
   "Font Lock mode face used to highlight warnings."
   :group 'font-lock-faces)
 
+(defface font-lock-regexp-grouping-backslash
+  '((t (:inherit font-lock-keyword-face :bold t)))
+  "Font Lock mode face for backslashes in Lisp regexp grouping constructs."
+:group 'font-lock-faces)
+
+(defface font-lock-regexp-grouping-construct
+  '((t (:inherit font-lock-keyword-face :bold t)))
+  "Font Lock mode face used to highlight grouping constructs in Lisp regexps."
+:group 'font-lock-faces)
+
 (defun font-lock-recompute-variables ()
   ;; Is this a Draconian thing to do?
   (mapc #'(lambda (buffer)

Repository URL: https://bitbucket.org/xemacs/xemacs/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.