emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 7f62a4a 4/7: Merge branch 'master' of git.sv.gnu.or


From: Michael Mauger
Subject: [Emacs-diffs] master 7f62a4a 4/7: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Date: Sun, 6 Aug 2017 20:59:20 -0400 (EDT)

branch: master
commit 7f62a4a7440aee6aacf04036feb3384a6515e48f
Merge: 776635c 7a0170d
Author: Michael R. Mauger <address@hidden>
Commit: Michael R. Mauger <address@hidden>

    Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
---
 configure.ac                    |  5 +++-
 doc/emacs/programs.texi         |  9 ++++---
 etc/NEWS                        |  4 ++++
 etc/themes/manoj-dark-theme.el  | 12 ++++++++++
 etc/themes/tsdh-dark-theme.el   | 10 ++++++++
 lisp/emacs-lisp/lisp-mode.el    | 13 +++++++---
 lisp/ffap.el                    |  3 ++-
 lisp/net/tramp.el               |  4 +---
 lisp/newcomment.el              | 37 ++++++++++++++--------------
 lisp/org/ob-abc.el              | 18 +++++++-------
 lisp/org/ob-ebnf.el             | 18 +++++++-------
 lisp/org/ob-lua.el              |  2 +-
 lisp/org/ob-sed.el              | 16 ++++++-------
 lisp/org/org-eww.el             |  8 +++----
 lisp/org/org-lint.el            | 10 ++++----
 lisp/org/ox-html.el             |  4 ++--
 lisp/progmodes/bug-reference.el |  4 +++-
 lisp/progmodes/cc-align.el      | 30 +++++++++++------------
 lisp/progmodes/cc-awk.el        |  4 ++--
 lisp/progmodes/cc-bytecomp.el   |  3 ++-
 lisp/progmodes/cc-cmds.el       |  4 ++--
 lisp/progmodes/cc-defs.el       |  4 ++--
 lisp/progmodes/cc-engine.el     | 53 +++++++++++++++++------------------------
 lisp/progmodes/cc-guess.el      |  3 +--
 lisp/progmodes/cc-langs.el      | 15 ++++--------
 lisp/progmodes/cc-mode.el       | 14 +++++------
 lisp/progmodes/cc-vars.el       | 12 +++++-----
 lisp/progmodes/python.el        |  2 +-
 src/bytecode.c                  | 12 ----------
 src/character.c                 | 17 +++++++++++++
 src/character.h                 | 18 ++++++++++++++
 src/charset.c                   | 12 +++++-----
 src/editfns.c                   |  6 ++---
 src/image.c                     | 32 ++++++++++++++-----------
 src/lread.c                     | 25 +++++--------------
 src/regex.c                     |  4 +---
 test/lisp/electric-tests.el     |  3 +--
 test/lisp/net/tramp-tests.el    | 45 +++++++++++++++++++---------------
 38 files changed, 266 insertions(+), 229 deletions(-)

diff --git a/configure.ac b/configure.ac
index ef61107..980b4c6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -957,6 +957,7 @@ AS_IF([test $gl_gcc_warnings = no],
   # This part is merely for shortening the command line,
   # since -Wno-FOO needs to be added below regardless.
   nw="$nw -Wmissing-field-initializers"
+  nw="$nw -Woverride-init"
   nw="$nw -Wtype-limits"
   nw="$nw -Wunused-parameter"
 
@@ -978,6 +979,7 @@ AS_IF([test $gl_gcc_warnings = no],
   done
   gl_WARN_ADD([-Wredundant-decls])     # Prefer this, as we don't use Bison.
   gl_WARN_ADD([-Wno-missing-field-initializers]) # We need this one
+  gl_WARN_ADD([-Wno-override-init])    # More trouble than it is worth
   gl_WARN_ADD([-Wno-sign-compare])     # Too many warnings for now
   gl_WARN_ADD([-Wno-type-limits])      # Too many warnings for now
   gl_WARN_ADD([-Wno-unused-parameter]) # Too many warnings for now
@@ -1005,9 +1007,10 @@ AS_IF([test $gl_gcc_warnings = no],
   ])
  ])
 
-# clang is unduly picky about these regardless of whether
+# clang is picky about these regardless of whether
 # --enable-gcc-warnings is specified.
 if test "$emacs_cv_clang" = yes; then
+  gl_WARN_ADD([-Wno-initializer-overrides])
   gl_WARN_ADD([-Wno-tautological-compare])
   gl_WARN_ADD([-Wno-tautological-constant-out-of-range-compare])
 fi
diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi
index 222d1c2..27ac0eb 100644
--- a/doc/emacs/programs.texi
+++ b/doc/emacs/programs.texi
@@ -1146,9 +1146,12 @@ comment or for aligning an existing comment.  It is set 
differently by
 various major modes.  The function is called with no arguments, but with
 point at the beginning of the comment, or at the end of a line if a new
 comment is to be inserted.  It should return the column in which the
-comment ought to start.  For example, in Lisp mode, the indent hook
-function bases its decision on how many semicolons begin an existing
-comment, and on the code in the preceding lines.
+comment ought to start.  For example, the default hook function bases
+its decision on how many comment characters begin an existing comment.
+
+Emacs also tries to align comments on adjacent lines.  To override
+this, the function may return a cons of two (possibly equal) integers
+to indicate an acceptable range of indentation.
 
 @node Documentation
 @section Documentation Lookup
diff --git a/etc/NEWS b/etc/NEWS
index 83cb73f..13805ce 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -405,6 +405,10 @@ display of raw bytes from octal to hex.
 ** You can now provide explicit field numbers in format specifiers.
 For example, '(format "%2$s %1$s" "X" "Y")' produces "Y X".
 
++++
+** 'comment-indent-function' values may now return a cons to specify a
+range of indentation.
+
 
 * Editing Changes in Emacs 26.1
 
diff --git a/etc/themes/manoj-dark-theme.el b/etc/themes/manoj-dark-theme.el
index 87a2af7..bbfeb83 100644
--- a/etc/themes/manoj-dark-theme.el
+++ b/etc/themes/manoj-dark-theme.el
@@ -602,6 +602,18 @@ jarring angry fruit salad look to reduce eye fatigue.")
  '(paren-no-match-face ((t (:bold t :background "white" :foreground "red"))))
  '(query-replace ((t (:foreground "brown4" :background "palevioletred2"))))
  '(region ((t (:background "blue3"))))
+
+ `(realgud-overlay-arrow1        ((t (:foreground "medium sea green"))))
+ `(realgud-overlay-arrow2        ((t (:foreground "white"))))
+ `(realgud-overlay-arrow3        ((t (:foreground "indian red"))))
+ `(realgud-bp-enabled-face       ((t (:inherit error))))
+ `(realgud-bp-disabled-face      ((t (:underline t))))
+ `(realgud-bp-line-enabled-face  ((t (:foreground "orange"))))
+ `(realgud-bp-line-disabled-face ((t (:underline t))))
+ `(realgud-file-name             ((t (:foreground "cyan"))))
+ `(realgud-line-number           ((t (:foreground "yellow"))))
+ `(realgud-backtrace-number      ((t (:foreground "yellow" :weight bold))))))
+
  '(scroll-bar ((t (:background "grey75" :foreground "WhiteSmoke"))))
  '(secondary-selection ((t (:background "SkyBlue4"))))
  '(semantic-dirty-token-face ((t (:background "lightyellow"))))
diff --git a/etc/themes/tsdh-dark-theme.el b/etc/themes/tsdh-dark-theme.el
index cd94a71..4f48854 100644
--- a/etc/themes/tsdh-dark-theme.el
+++ b/etc/themes/tsdh-dark-theme.el
@@ -118,6 +118,16 @@
  '(outline-6 ((t (:foreground "light salmon" :weight bold))))
  '(outline-7 ((t (:foreground "pale goldenrod" :weight bold))))
  '(outline-8 ((t (:foreground "OliveDrab1" :weight bold))))
+ `(realgud-overlay-arrow1        ((t (:foreground "medium spring green"))))
+ `(realgud-overlay-arrow2        ((t (:foreground "OliveDrab1"))))
+ `(realgud-overlay-arrow3        ((t (:foreground "light salmon"))))
+ `(realgud-bp-enabled-face       ((t (:inherit error))))
+ `(realgud-bp-disabled-face      ((t (:foreground "gray35"))))
+ `(realgud-bp-line-enabled-face  ((t (:foreground "light salmon"))))
+ `(realgud-bp-line-disabled-face ((t (:foreground "medium spring green"))))
+ `(realgud-file-name             ((t (:foreground "dark khaki"))))
+ `(realgud-line-number           ((t (:foreground "cyan3"))))
+ `(realgud-backtrace-number      ((t (:foreground "cyan3" :weight bold))))))
  '(rcirc-my-nick ((t (:foreground "SpringGreen1" :weight bold))) t)
  '(rcirc-other-nick ((t (:foreground "dodger blue"))) t)
  '(rcirc-track-keyword ((t (:foreground "DodgerBlue" :weight bold))) t)
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 59db00d..985b751 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -602,6 +602,7 @@ font-lock keywords will not be case sensitive."
   ;;(set (make-local-variable 'adaptive-fill-mode) nil)
   (setq-local indent-line-function 'lisp-indent-line)
   (setq-local indent-region-function 'lisp-indent-region)
+  (setq-local comment-indent-function #'lisp-comment-indent)
   (setq-local outline-regexp ";;;\\(;* [^ \t\n]\\|###autoload\\)\\|(")
   (setq-local outline-level 'lisp-outline-level)
   (setq-local add-log-current-defun-function #'lisp-current-defun-name)
@@ -735,9 +736,15 @@ or to switch back to an existing one."
 
 (autoload 'lisp-eval-defun "inf-lisp" nil t)
 
-;; May still be used by some external Lisp-mode variant.
-(define-obsolete-function-alias 'lisp-comment-indent
-    'comment-indent-default "22.1")
+(defun lisp-comment-indent ()
+  "Like `comment-indent-default', but don't put space after open paren."
+  (let ((pt (point)))
+    (skip-syntax-backward " ")
+    (if (eq (preceding-char) ?\()
+        (cons (current-column) (current-column))
+      (goto-char pt)
+      (comment-indent-default))))
+
 (define-obsolete-function-alias 'lisp-mode-auto-fill 'do-auto-fill "23.1")
 
 (defcustom lisp-indent-offset nil
diff --git a/lisp/ffap.el b/lisp/ffap.el
index 8753111..8bcfbfc 100644
--- a/lisp/ffap.el
+++ b/lisp/ffap.el
@@ -1536,7 +1536,8 @@ If `ffap-url-regexp' is not nil, the FILENAME may also be 
an URL.
 With a prefix, this command behaves exactly like `ffap-file-finder'.
 If `ffap-require-prefix' is set, the prefix meaning is reversed.
 See also the variables `ffap-dired-wildcards', `ffap-newfile-prompt',
-and the functions `ffap-file-at-point' and `ffap-url-at-point'."
+`ffap-url-unwrap-local', `ffap-url-unwrap-remote', and the functions
+`ffap-file-at-point' and `ffap-url-at-point'."
   (interactive)
   (if (and (called-interactively-p 'interactive)
           (if ffap-require-prefix (not current-prefix-arg)
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 9c327c4..945f811 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -2128,9 +2128,7 @@ Falls back to normal file name handler if no Tramp file 
name handler exists."
                                  (unwind-protect
                                      (let ((tramp-locker t))
                                        (apply foreign operation args))
-                                   ;; Give timers a chance.
-                                   (unless (setq tramp-locked tl)
-                                     (sit-for 0.001 'nodisp)))))))
+                                   (setq tramp-locked tl))))))
                      (cond
                       ((eq result 'non-essential)
                        (tramp-message
diff --git a/lisp/newcomment.el b/lisp/newcomment.el
index 4b261c3..8772b523 100644
--- a/lisp/newcomment.el
+++ b/lisp/newcomment.el
@@ -142,9 +142,10 @@ Should be an empty string if comments are terminated by 
end-of-line.")
 ;;;###autoload
 (defvar comment-indent-function 'comment-indent-default
   "Function to compute desired indentation for a comment.
-This function is called with no args with point at the beginning of
-the comment's starting delimiter and should return either the desired
-column indentation or nil.
+This function is called with no args with point at the beginning
+of the comment's starting delimiter and should return either the
+desired column indentation, a range of acceptable
+indentation (MIN . MAX), or nil.
 If nil is returned, indentation is delegated to `indent-according-to-mode'.")
 
 ;;;###autoload
@@ -649,13 +650,20 @@ The criteria are (in this order):
 - prefer INDENT (or `comment-column' if nil).
 Point is expected to be at the start of the comment."
   (unless indent (setq indent comment-column))
-  ;; Avoid moving comments past the fill-column.
-  (let ((max (+ (current-column)
-                (- (or comment-fill-column fill-column)
-                   (save-excursion (end-of-line) (current-column)))))
-        (other nil)
-        (min (save-excursion (skip-chars-backward " \t")
-                             (if (bolp) 0 (+ comment-inline-offset 
(current-column))))))
+  (let ((other nil)
+        min max)
+    (pcase indent
+      (`(,lo . ,hi) (setq min lo) (setq max hi)
+       (setq indent comment-column))
+      (_ ;; Avoid moving comments past the fill-column.
+       (setq max (+ (current-column)
+                    (- (or comment-fill-column fill-column)
+                       (save-excursion (end-of-line) (current-column)))))
+       (setq min (save-excursion
+                   (skip-chars-backward " \t")
+                   ;; Leave at least `comment-inline-offset' space after
+                   ;; other nonwhite text on the line.
+                   (if (bolp) 0 (+ comment-inline-offset (current-column)))))))
     ;; Fix up the range.
     (if (< max min) (setq max min))
     ;; Don't move past the fill column.
@@ -750,13 +758,6 @@ If CONTINUE is non-nil, use the `comment-continue' markers 
if any."
          ;; If the comment is at the right of code, adjust the indentation.
          (unless (save-excursion (skip-chars-backward " \t") (bolp))
            (setq indent (comment-choose-indent indent)))
-         ;; Update INDENT to leave at least one space
-         ;; after other nonwhite text on the line.
-         (save-excursion
-           (skip-chars-backward " \t")
-           (unless (bolp)
-             (setq indent (max indent
-                                (+ (current-column) comment-inline-offset)))))
          ;; If that's different from comment's current position, change it.
          (unless (= (current-column) indent)
            (delete-region (point) (progn (skip-chars-backward " \t") (point)))
@@ -815,7 +816,7 @@ N defaults to 0.
 If N is `re', a regexp is returned instead, that would match
 the string for any N."
   (setq n (or n 0))
-  (when (and (stringp str) (not (string= "" str)))
+  (when (and (stringp str) (string-match "\\S-" str))
     ;; Separate the actual string from any leading/trailing padding
     (string-match "\\`\\s-*\\(.*?\\)\\s-*\\'" str)
     (let ((s (match-string 1 str))     ;actual string
diff --git a/lisp/org/ob-abc.el b/lisp/org/ob-abc.el
index 0ce503d..9fbe35b 100644
--- a/lisp/org/ob-abc.el
+++ b/lisp/org/ob-abc.el
@@ -7,22 +7,20 @@
 ;; Homepage: http://www.tardis.ed.ac.uk/wwaites
 ;; Version: 0.01
 
-;;; License:
+;; This file is part of GNU Emacs.
 
-;; This program is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; GNU General Public License for more details.
-;;
+
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 
diff --git a/lisp/org/ob-ebnf.el b/lisp/org/ob-ebnf.el
index 410570b..ec5001c 100644
--- a/lisp/org/ob-ebnf.el
+++ b/lisp/org/ob-ebnf.el
@@ -7,22 +7,20 @@
 ;; Homepage: http://orgmode.org
 ;; Version: 1.00
 
-;;; License:
+;; This file is part of GNU Emacs.
 
-;; This program is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; GNU General Public License for more details.
-;;
+
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 
diff --git a/lisp/org/ob-lua.el b/lisp/org/ob-lua.el
index fa60b0e..686d41a 100644
--- a/lisp/org/ob-lua.el
+++ b/lisp/org/ob-lua.el
@@ -1,6 +1,6 @@
 ;;; ob-lua.el --- Org Babel functions for Lua evaluation -*- lexical-binding: 
t; -*-
 
-;; Copyright (C) 2014, 2016, 2017 Free Software Foundation, Inc.
+;; Copyright (C) 2014, 2016-2017 Free Software Foundation, Inc.
 
 ;; Authors: Dieter Schoen
 ;; Keywords: literate programming, reproducible research
diff --git a/lisp/org/ob-sed.el b/lisp/org/ob-sed.el
index 733c7e1..f249d32 100644
--- a/lisp/org/ob-sed.el
+++ b/lisp/org/ob-sed.el
@@ -8,20 +8,18 @@
 
 ;; This file is part of GNU Emacs.
 
-;;; License:
-
-;; This program is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; GNU General Public License for more details.
-;;
+
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 
diff --git a/lisp/org/org-eww.el b/lisp/org/org-eww.el
index 7bc248d..c14ae11 100644
--- a/lisp/org/org-eww.el
+++ b/lisp/org/org-eww.el
@@ -5,15 +5,15 @@
 ;; Author: Marco Wahl <marcowahlsoft>a<gmailcom>
 ;; Keywords: link, eww
 ;; Homepage: http://orgmode.org
-;;
+
 ;; This file is part of GNU Emacs.
-;;
-;; This program is free software: you can redistribute it and/or modify
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
 ;; the Free Software Foundation, either version 3 of the License, or
 ;; (at your option) any later version.
 
-;; This program is distributed in the hope that it will be useful,
+;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; GNU General Public License for more details.
diff --git a/lisp/org/org-lint.el b/lisp/org/org-lint.el
index 89aed4b..5abda7c 100644
--- a/lisp/org/org-lint.el
+++ b/lisp/org/org-lint.el
@@ -1,22 +1,24 @@
 ;;; org-lint.el --- Linting for Org documents        -*- lexical-binding: t; 
-*-
 
-;; Copyright (C) 2015-2017  Free Software Foundation
+;; Copyright (C) 2015-2017 Free Software Foundation, Inc.
 
 ;; Author: Nicolas Goaziou <address@hidden>
 ;; Keywords: outlines, hypermedia, calendar, wp
 
-;; This program is free software; you can redistribute it and/or modify
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
 ;; the Free Software Foundation, either version 3 of the License, or
 ;; (at your option) any later version.
 
-;; This program is distributed in the hope that it will be useful,
+;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 
diff --git a/lisp/org/ox-html.el b/lisp/org/ox-html.el
index 9c0ba65..49562fa 100644
--- a/lisp/org/ox-html.el
+++ b/lisp/org/ox-html.el
@@ -518,7 +518,7 @@ means to use the maximum value consistent with other 
options."
  * @licstart  The following is the entire license notice for the
  *  JavaScript code in %SCRIPT_PATH.
  *
- * Copyright (C) 2012-2013 Free Software Foundation, Inc.
+ * Copyright (C) 2012-2017 Free Software Foundation, Inc.
  *
  *
  * The JavaScript code in this tag is free software: you can
@@ -547,7 +547,7 @@ means to use the maximum value consistent with other 
options."
 @licstart  The following is the entire license notice for the
 JavaScript code in this tag.
 
-Copyright (C) 2012-2013 Free Software Foundation, Inc.
+Copyright (C) 2012-2017 Free Software Foundation, Inc.
 
 The JavaScript code in this tag is free software: you can
 redistribute it and/or modify it under the terms of the GNU
diff --git a/lisp/progmodes/bug-reference.el b/lisp/progmodes/bug-reference.el
index 210f035..13c52a4 100644
--- a/lisp/progmodes/bug-reference.el
+++ b/lisp/progmodes/bug-reference.el
@@ -73,10 +73,12 @@ so that it is considered safe, see 
`enable-local-variables'.")
   "Regular expression matching bug references.
 The second subexpression should match the bug reference (usually a number)."
   :type 'string
-  :safe 'stringp
   :version "24.3"                      ; previously defconst
   :group 'bug-reference)
 
+;;;###autoload
+(put 'bug-reference-bug-regexp 'safe-local-variable 'stringp)
+
 (defun bug-reference-set-overlay-properties ()
   "Set properties of bug reference overlays."
   (put 'bug-reference 'evaporate t)
diff --git a/lisp/progmodes/cc-align.el b/lisp/progmodes/cc-align.el
index 0f7e4b5..dbedb59 100644
--- a/lisp/progmodes/cc-align.el
+++ b/lisp/progmodes/cc-align.el
@@ -159,7 +159,7 @@ Works with: topmost-intro-cont."
       (c-safe-position (or containing-sexp (point)) c-state-cache)
       containing-sexp))))
 
-(defun c-lineup-arglist (langelem)
+(defun c-lineup-arglist (_langelem)
   "Line up the current argument line under the first argument.
 
 As a special case, if the indented line is inside a brace block
@@ -265,7 +265,7 @@ Works with: arglist-cont, arglist-cont-nonempty."
            (c-forward-syntactic-ws))
        (c-lineup-argcont-scan other-match)))))
 
-(defun c-lineup-arglist-intro-after-paren (langelem)
+(defun c-lineup-arglist-intro-after-paren (_langelem)
   "Line up a line to just after the open paren of the surrounding paren
 or brace block.
 
@@ -483,7 +483,7 @@ Works with: func-decl-cont."
            (vector (+ (current-column) c-basic-offset)))
        c-basic-offset))))
 
-(defun c-indent-one-line-block (langelem)
+(defun c-indent-one-line-block (_langelem)
   "Indent a one line block `c-basic-offset' extra.
 E.g.:
 
@@ -506,7 +506,7 @@ Work with: Almost all syntactic symbols, but most useful on 
*-open."
          c-basic-offset
        nil))))
 
-(defun c-indent-multi-line-block (langelem)
+(defun c-indent-multi-line-block (_langelem)
   "Indent a multi line block `c-basic-offset' extra.
 E.g.:
 
@@ -642,7 +642,7 @@ Works with: The `c' syntactic symbol."
                  (goto-char (c-langelem-pos langelem)))))
          (vector (current-column)))))))
 
-(defun c-lineup-comment (langelem)
+(defun c-lineup-comment (_langelem)
   "Line up a comment start according to `c-comment-only-line-offset'.
 If the comment is lined up with a comment starter on the previous
 line, that alignment is preserved.
@@ -667,7 +667,7 @@ Works with: comment-intro."
            -1000))                     ;jam it against the left side
        ))))
 
-(defun c-lineup-knr-region-comment (langelem)
+(defun c-lineup-knr-region-comment (_langelem)
   "Line up a comment in the \"K&R region\" with the declaration.
 That is the region between the function or class header and the
 beginning of the block.  E.g.:
@@ -836,7 +836,7 @@ arglist-cont-nonempty."
 
          (vector col))))))
 
-(defun c-lineup-string-cont (langelem)
+(defun c-lineup-string-cont (_langelem)
   "Line up a continued string under the one it continues.
 A continued string in this sense is where a string literal follows
 directly after another one.  E.g.:
@@ -861,7 +861,7 @@ arglist-cont-nonempty."
             (goto-char pos)
             (vector (current-column)))))))
 
-(defun c-lineup-template-args (langelem)
+(defun c-lineup-template-args (_langelem)
   "Line up template argument lines under the first argument.
 To allow this function to be used in a list expression, nil is
 returned if there's no template argument on the first line.
@@ -992,7 +992,7 @@ Works with: objc-method-args-cont."
            (+ curcol (- prev-col-column (current-column)))
          c-basic-offset)))))
 
-(defun c-lineup-inexpr-block (langelem)
+(defun c-lineup-inexpr-block (_langelem)
   "Line up the block for constructs that use a block inside an expression,
 e.g. anonymous classes in Java and lambda functions in Pike.  The body
 is aligned with the start of the header, e.g. with the \"new\" or
@@ -1020,7 +1020,7 @@ Works with: inlambda, inexpr-statement, inexpr-class."
        (goto-char (cdr res))
        (vector (current-column))))))
 
-(defun c-lineup-whitesmith-in-block (langelem)
+(defun c-lineup-whitesmith-in-block (_langelem)
   "Line up lines inside a block in Whitesmith style.
 It's done in a way that works both when the opening brace hangs and
 when it doesn't.  E.g.:
@@ -1084,7 +1084,7 @@ arglist-cont."
              (vector (+ (current-column) c-basic-offset))))
        (vector 0)))))
 
-(defun c-lineup-cpp-define (langelem)
+(defun c-lineup-cpp-define (_langelem)
   "Line up macro continuation lines according to the indentation of
 the construct preceding the macro.  E.g.:
 
@@ -1233,7 +1233,7 @@ Works with: Any syntactic symbol which has an anchor 
position."
     (vector (current-column))))
     
 
-(defun c-lineup-dont-change (langelem)
+(defun c-lineup-dont-change (_langelem)
   "Do not change the indentation of the current line.
 
 Works with: Any syntactic symbol."
@@ -1241,7 +1241,7 @@ Works with: Any syntactic symbol."
     (back-to-indentation)
     (vector (current-column))))
 
-(defun c-lineup-respect-col-0 (langelem)
+(defun c-lineup-respect-col-0 (_langelem)
   "If the current line starts at column 0, return [0].  Otherwise return nil.
 
 This can be used for comments (in conjunction with, say,
@@ -1254,7 +1254,7 @@ anchored there, but reindent other comments."
       nil)))
 
 
-(defun c-snug-do-while (syntax pos)
+(defun c-snug-do-while (syntax _pos)
   "Dynamically calculate brace hanginess for do-while statements.
 Using this function, `while' clauses that end a `do-while' block will
 remain on the same line as the brace that closes that block.
@@ -1272,7 +1272,7 @@ ACTION associated with `block-close' syntax."
          '(before)
        '(before after)))))
 
-(defun c-snug-1line-defun-close (syntax pos)
+(defun c-snug-1line-defun-close (_syntax pos)
   "Determine the brace hanginess for an AWK defun-close.
 If the action/function being closed is a one-liner, keep it so.  Otherwise put
 the closing brace on its own line."
diff --git a/lisp/progmodes/cc-awk.el b/lisp/progmodes/cc-awk.el
index 736f1de..662329b 100644
--- a/lisp/progmodes/cc-awk.el
+++ b/lisp/progmodes/cc-awk.el
@@ -592,7 +592,7 @@
   ;; starts at a `while' token.
   (not (c-get-char-property (c-point 'eol) 'c-awk-NL-prop)))
 
-(defun c-awk-clear-NL-props (beg end)
+(defun c-awk-clear-NL-props (beg _end)
   ;; This function is run from before-change-hooks.  It clears the
   ;; c-awk-NL-prop text property from beg to the end of the buffer (The END
   ;; parameter is ignored).  This ensures that the indentation engine will
@@ -847,7 +847,7 @@
 ;; Just beyond logical line following the region which is about to be changed.
 ;; Set in c-awk-record-region-clear-NL and used in c-awk-after-change.
 
-(defun c-awk-record-region-clear-NL (beg end)
+(defun c-awk-record-region-clear-NL (_beg end)
 ;; This function is called exclusively from the before-change-functions hook.
 ;; It does two things: Finds the end of the (logical) line on which END lies,
 ;; and clears c-awk-NL-prop text properties from this point onwards.  BEG is
diff --git a/lisp/progmodes/cc-bytecomp.el b/lisp/progmodes/cc-bytecomp.el
index e98b3df..f15d28e 100644
--- a/lisp/progmodes/cc-bytecomp.el
+++ b/lisp/progmodes/cc-bytecomp.el
@@ -86,6 +86,7 @@
 (defvar cc-bytecomp-environment-set nil)
 
 (defmacro cc-bytecomp-debug-msg (&rest args)
+  (ignore args)
   ;;`(message ,@args)
   )
 
@@ -252,7 +253,7 @@ perhaps a `cc-bytecomp-restore-environment' is forgotten 
somewhere"))
        (cc-bytecomp-debug-msg
         "cc-bytecomp-restore-environment: Done"))))
 
-(defun cc-bytecomp-load (cc-part)
+(defun cc-bytecomp-load (_cc-part)
   ;; A dummy function which will immediately be overwritten by the
   ;; following at load time.  This should suppress the byte compiler
   ;; error that the function is "not known to be defined".
diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el
index de25439..121ba24 100644
--- a/lisp/progmodes/cc-cmds.el
+++ b/lisp/progmodes/cc-cmds.el
@@ -51,6 +51,8 @@
 ;; Indentation / Display syntax functions
 (defvar c-fix-backslashes t)
 
+(defvar c-syntactic-context)
+
 (defun c-indent-line (&optional syntax quiet ignore-point-pos)
   "Indent the current line according to the syntactic context,
 if `c-syntactic-indentation' is non-nil.  Optional SYNTAX is the
@@ -1635,7 +1637,6 @@ defun."
   (c-save-buffer-state
       (beginning-of-defun-function
        end-of-defun-function
-       (start (point))
        (paren-state (c-parse-state))
        (orig-point-min (point-min)) (orig-point-max (point-max))
        lim                 ; Position of { which has been widened to.
@@ -1759,7 +1760,6 @@ the open-parenthesis that starts a defun; see 
`beginning-of-defun'."
   (c-save-buffer-state
       (beginning-of-defun-function
        end-of-defun-function
-       (start (point))
        (paren-state (c-parse-state))
        (orig-point-min (point-min)) (orig-point-max (point-max))
        lim
diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el
index 85a4085..eb7bde0 100644
--- a/lisp/progmodes/cc-defs.el
+++ b/lisp/progmodes/cc-defs.el
@@ -367,6 +367,8 @@ to it is returned.  This function does not modify the point 
or the mark."
          (t (error "Unknown buffer position requested: %s" position))))
        (point))))
 
+(defvar lookup-syntax-properties)       ;XEmacs.
+
 (eval-and-compile
   ;; Constant to decide at compilation time whether to use category
   ;; properties.  Currently (2010-03) they're available only on GNU Emacs.
@@ -1832,8 +1834,6 @@ non-nil, a caret is prepended to invert the set."
 
 (cc-bytecomp-defvar open-paren-in-column-0-is-defun-start)
 
-(defvar lookup-syntax-properties)       ;XEmacs.
-
 (defconst c-emacs-features
   (let (list)
 
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 955e1eb..e880bd3 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -241,7 +241,7 @@
 ;; Either nil, or the last character of the macro currently represented by
 ;; `c-macro-cache' which isn't in a comment. */
 
-(defun c-invalidate-macro-cache (beg end)
+(defun c-invalidate-macro-cache (beg _end)
   ;; Called from a before-change function.  If the change region is before or
   ;; in the macro characterized by `c-macro-cache' etc., nullify it
   ;; appropriately.  BEG and END are the standard before-change-functions
@@ -834,7 +834,7 @@ comment at the start of cc-engine.el for more info."
        (c-stmt-delim-chars (if comma-delim
                                c-stmt-delim-chars-with-comma
                              c-stmt-delim-chars))
-       c-in-literal-cache c-maybe-labelp after-case:-pos saved
+       c-maybe-labelp after-case:-pos saved
        ;; Current position.
        pos
        ;; Position of last stmt boundary character (e.g. ;).
@@ -1680,6 +1680,7 @@ comment at the start of cc-engine.el for more info."
 ;             (not (eobp)))))))
 
 (defmacro c-debug-sws-msg (&rest args)
+  (ignore args)
   ;;`(message ,@args)
   )
 
@@ -3307,7 +3308,6 @@ comment at the start of cc-engine.el for more info."
        paren+1s              ; A list of `paren+1's; used to determine a
                              ; good-pos.
        bra+1                 ; just after L bra-ce.
-       bra+1s                ; list of OLD values of bra+1.
        mstart)               ; start of a macro.
 
     (save-excursion
@@ -3345,7 +3345,7 @@ comment at the start of cc-engine.el for more info."
                    ;; Insert the opening brace/bracket/paren position.
                    (setq c-state-cache (cons (1- pa+1) c-state-cache))
                    ;; Clear admin stuff for the next more nested part of the 
scan.
-                   (setq ren+1 pa+1  pa+1 nil  bra+1 nil  bra+1s nil)
+                   (setq ren+1 pa+1  pa+1 nil  bra+1 nil)
                    t)                  ; Carry on the loop
 
                ;; All open p/b/b's at this nesting level, if any, have probably
@@ -3429,7 +3429,7 @@ comment at the start of cc-engine.el for more info."
             upper-lim     ; ,beyond which `c-state-cache' entries are removed
             scan-back-pos
             cons-separated
-            pair-beg pps-point-state target-depth)
+            pair-beg target-depth)
 
        ;; Remove entries beyond HERE.  Also remove any entries inside
        ;; a macro, unless HERE is in the same macro.
@@ -3485,9 +3485,6 @@ comment at the start of cc-engine.el for more info."
                 target-depth
                 nil pps-state))
 
-         (if (= (point) pps-point)
-             (setq pps-point-state pps-state))
-
          (when (eq (car pps-state) target-depth)
            (setq pos (point))       ; POS is now just after an R-paren/brace.
            (cond
@@ -3732,11 +3729,10 @@ comment at the start of cc-engine.el for more info."
     ;; brace pair.
     (let ((here-bol (c-point 'bol here))
          too-high-pa  ; recorded {/(/[ next above or just below here, or nil.
-         dropped-cons            ; was the last removed element a brace pair?
-         pa)
+         dropped-cons)           ; was the last removed element a brace pair?
       ;; The easy bit - knock over-the-top bits off `c-state-cache'.
       (while (and c-state-cache
-                 (>= (setq pa (c-state-cache-top-paren)) here))
+                 (>= (c-state-cache-top-paren) here))
        (setq dropped-cons (consp (car c-state-cache))
              too-high-pa (c-state-cache-top-lparen)
              c-state-cache (cdr c-state-cache)))
@@ -5027,7 +5023,7 @@ comment at the start of cc-engine.el for more info."
 
 ;; Tools for handling comments and string literals.
 
-(defun c-in-literal (&optional lim detect-cpp)
+(defun c-in-literal (&optional _lim detect-cpp)
   "Return the type of literal point is in, if any.
 The return value is `c' if in a C-style comment, `c++' if in a C++
 style comment, `string' if in a string literal, `pound' if DETECT-CPP
@@ -5035,9 +5031,6 @@ is non-nil and in a preprocessor line, or nil if 
somewhere else.
 Optional LIM is used as the backward limit of the search.  If omitted,
 or nil, `c-beginning-of-defun' is used.
 
-The last point calculated is cached if the cache is enabled, i.e. if
-`c-in-literal-cache' is bound to a two element vector.
-
 Note that this function might do hidden buffer changes.  See the
 comment at the start of cc-engine.el for more info."
   (save-restriction
@@ -6139,7 +6132,7 @@ comment at the start of cc-engine.el for more info."
 ;; Shut up the byte compiler.
 (defvar c-maybe-stale-found-type)
 
-(defun c-trim-found-types (beg end old-len)
+(defun c-trim-found-types (beg end _old-len)
   ;; An after change function which, in conjunction with the info in
   ;; c-maybe-stale-found-type (set in c-before-change), removes a type
   ;; from `c-found-types', should this type have become stale.  For
@@ -6409,6 +6402,9 @@ comment at the start of cc-engine.el for more info."
            (c-clear-<>-pair-props)
            (forward-char)))))))
 
+(defvar c-restricted-<>-arglists)      ;FIXME: Move definition here?
+(defvar c-parse-and-markup-<>-arglists)        ;FIXME: Move definition here?
+
 (defun c-restore-<>-properties (_beg _end _old-len)
   ;; This function is called as an after-change function.  It restores the
   ;; category/syntax-table properties on template/generic <..> pairs between
@@ -6715,7 +6711,7 @@ comment at the start of cc-engine.el for more info."
        (c-put-char-property open-paren 'syntax-table '(1)))
       (goto-char bound))))
 
-(defun c-after-change-re-mark-raw-strings (beg end old-len)
+(defun c-after-change-re-mark-raw-strings (_beg _end _old-len)
   ;; This function applies `syntax-table' text properties to C++ raw strings
   ;; beginning in the region (c-new-BEG c-new-END).  BEG, END, and OLD-LEN are
   ;; the standard arguments supplied to any after-change function.
@@ -8239,10 +8235,6 @@ comment at the start of cc-engine.el for more info."
        ;; If `backup-at-type' is nil then the other variables have
        ;; undefined values.
        backup-at-type backup-type-start backup-id-start
-       ;; This stores `kwd-sym' of the symbol before the current one.
-       ;; This is needed to distinguish the C++11 version of "auto" from
-       ;; the pre C++11 meaning.
-       backup-kwd-sym
        ;; Set if we've found a specifier (apart from "typedef") that makes
        ;; the defined identifier(s) types.
        at-type-decl
@@ -8350,7 +8342,6 @@ comment at the start of cc-engine.el for more info."
            (setq backup-at-type at-type
                  backup-type-start type-start
                  backup-id-start id-start
-                 backup-kwd-sym kwd-sym
                  at-type found-type
                  type-start start
                  id-start (point)
@@ -8904,9 +8895,9 @@ comment at the start of cc-engine.el for more info."
         ;; uncommon (e.g. some placements of "const" in C++) it's not worth
         ;; the effort to look for them.)
 
-;;; 2008-04-16: commented out the next form, to allow the function to recognize
-;;; "foo (int bar)" in CC (an implicit type (in class foo) without a semicolon)
-;;; as a(n almost complete) declaration, enabling it to be fontified.
+;;;  2008-04-16: commented out the next form, to allow the function to 
recognize
+;;;  "foo (int bar)" in CC (an implicit type (in class foo) without a 
semicolon)
+;;;  as a(n almost complete) declaration, enabling it to be fontified.
         ;; CASE 13
         ;;     (unless (or at-decl-end (looking-at "=[^=]"))
         ;; If this is a declaration it should end here or its initializer(*)
@@ -10038,7 +10029,7 @@ comment at the start of cc-engine.el for more info."
                 (c-syntactic-re-search-forward ";" nil 'move t))))
       nil)))
 
-(defun c-looking-at-decl-block (containing-sexp goto-start &optional limit)
+(defun c-looking-at-decl-block (_containing-sexp goto-start &optional limit)
   ;; Assuming the point is at an open brace, check if it starts a
   ;; block that contains another declaration level, i.e. that isn't a
   ;; statement block or a brace list, and if so return non-nil.
@@ -10311,7 +10302,7 @@ comment at the start of cc-engine.el for more info."
   ;; We're at a "{".  Move back to the enum-like keyword that starts this
   ;; declaration and return t, otherwise don't move and return nil.
   (let ((here (point))
-       up-sexp-pos before-identifier)
+       before-identifier)
     (when c-recognize-post-brace-list-type-p
       (c-backward-typed-enum-colon))
     (while
@@ -10581,7 +10572,7 @@ comment at the start of cc-engine.el for more info."
                   next-containing nil))))
        (and (consp bufpos) (car bufpos))))))
 
-(defun c-looking-at-special-brace-list (&optional lim)
+(defun c-looking-at-special-brace-list (&optional _lim)
   ;; If we're looking at the start of a pike-style list, i.e., `({ })',
   ;; `([ ])', `(< >)', etc., a cons of a cons of its starting and ending
   ;; positions and its entry in c-special-brace-lists is returned, nil
@@ -10644,7 +10635,7 @@ comment at the start of cc-engine.el for more info."
                    (cons (list beg) type)))))
        (error nil))))
 
-(defun c-looking-at-bos (&optional lim)
+(defun c-looking-at-bos (&optional _lim)
   ;; Return non-nil if between two statements or declarations, assuming
   ;; point is not inside a literal or comment.
   ;;
@@ -11206,7 +11197,7 @@ comment at the start of cc-engine.el for more info."
                           containing-decl-open
                           containing-decl-start
                           containing-decl-kwd
-                          paren-state)
+                          _paren-state)
   ;; The inclass and class-close syntactic symbols are added in
   ;; several places and some work is needed to fix everything.
   ;; Therefore it's collected here.
@@ -11422,7 +11413,7 @@ comment at the start of cc-engine.el for more info."
         ;; following result clauses, and most of this function is a
         ;; single gigantic cond. :P
         literal char-before-ip before-ws-ip char-after-ip macro-start
-        in-macro-expr c-syntactic-context placeholder c-in-literal-cache
+        in-macro-expr c-syntactic-context placeholder
         step-type tmpsymbol keyword injava-inher special-brace-list tmp-pos
         containing-<
         ;; The following record some positions for the containing
diff --git a/lisp/progmodes/cc-guess.el b/lisp/progmodes/cc-guess.el
index 153b3a3..c8cd6fb 100644
--- a/lisp/progmodes/cc-guess.el
+++ b/lisp/progmodes/cc-guess.el
@@ -494,8 +494,7 @@ is called with one argument, the guessed style."
   ;; If an entry in `c-offsets-alist' holds a guessed value, move it to
   ;; front in the field. In addition alphabetical sort by entry name is done.
   (setq style (copy-tree style))
-  (let ((offsets-alist-cell (assq 'c-offsets-alist style))
-       (guessed-syntactic-symbols (c-guess-guessed-syntactic-symbols)))
+  (let ((offsets-alist-cell (assq 'c-offsets-alist style)))
     (setcdr offsets-alist-cell
            (sort (cdr offsets-alist-cell)
                  (lambda (a b)
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index 8be8060..93e8df1 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -115,7 +115,7 @@
 
 ;; For Emacs < 22.2.
 (eval-and-compile
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+  (unless (fboundp 'declare-function) (defmacro declare-function (&rest _))))
 
 (eval-when-compile
   (let ((load-path
@@ -245,12 +245,12 @@ the evaluated constant value at compile time."
     (unless (listp (car-safe ops))
       (setq ops (list ops)))
     (cond ((eq opgroup-filter t)
-          (setq opgroup-filter (lambda (opgroup) t)))
+          (setq opgroup-filter (lambda (_opgroup) t)))
          ((not (functionp opgroup-filter))
           (setq opgroup-filter `(lambda (opgroup)
                                   (memq opgroup ',opgroup-filter)))))
     (cond ((eq op-filter t)
-          (setq op-filter (lambda (op) t)))
+          (setq op-filter (lambda (_op) t)))
          ((stringp op-filter)
           (setq op-filter `(lambda (op)
                              (string-match ,op-filter op)))))
@@ -2852,14 +2852,7 @@ Note that Java specific rules are currently applied to 
tell this from
                            left-assoc
                            right-assoc
                            right-assoc-sequence)
-                         t))
-
-          (unambiguous-prefix-ops (c--set-difference nonkeyword-prefix-ops
-                                                     in-or-postfix-ops
-                                                     :test 'string-equal))
-          (ambiguous-prefix-ops (c--intersection nonkeyword-prefix-ops
-                                                 in-or-postfix-ops
-                                                 :test 'string-equal)))
+                         t)))
 
       (concat
        "\\("
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index ef93f75..4ea0974 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -927,7 +927,7 @@ Note that the style variables are always made local to the 
buffer."
       (c-clear-char-property-with-value
        m-beg (point) 'syntax-table '(1)))))
 
-(defun c-extend-region-for-CPP (beg end)
+(defun c-extend-region-for-CPP (_beg _end)
   ;; Adjust `c-new-BEG', `c-new-END' respectively to the beginning and end of
   ;; any preprocessor construct they may be in.
   ;;
@@ -951,7 +951,7 @@ Note that the style variables are always made local to the 
buffer."
   (when (> (point) c-new-END)
     (setq c-new-END (min (point) (c-determine-+ve-limit 500 c-new-END)))))
 
-(defun c-depropertize-new-text (beg end old-len)
+(defun c-depropertize-new-text (beg end _old-len)
   ;; Remove from the new text in (BEG END) any and all text properties which
   ;; might interfere with CC Mode's proper working.
   ;;
@@ -970,7 +970,7 @@ Note that the style variables are always made local to the 
buffer."
       (c-clear-char-properties beg end 'c-type)
       (c-clear-char-properties beg end 'c-awk-NL-prop))))
 
-(defun c-extend-font-lock-region-for-macros (begg endd old-len)
+(defun c-extend-font-lock-region-for-macros (_begg endd _old-len)
   ;; Extend the region (c-new-BEG c-new-END) to cover all (possibly changed)
   ;; preprocessor macros; The return value has no significance.
   ;;
@@ -1015,7 +1015,7 @@ Note that the style variables are always made local to 
the buffer."
              t)
             (t nil)))))))
 
-(defun c-neutralize-syntax-in-and-mark-CPP (begg endd old-len)
+(defun c-neutralize-syntax-in-and-mark-CPP (_begg _endd _old-len)
   ;; (i) "Neutralize" every preprocessor line wholly or partially in the
   ;; changed region.  "Restore" lines which were CPP lines before the change
   ;; and are no longer so.
@@ -1197,7 +1197,7 @@ Note that this is a strict tail, so won't match, e.g. 
\"0x....\".")
   ;;
   ;; This function is called exclusively as a before-change function via the
   ;; variable `c-get-state-before-change-functions'.
-  (c-save-buffer-state (p-limit limits found)
+  (c-save-buffer-state (p-limit found)
     ;; Special consideraton for deleting \ from '\''.
     (if (and (> end beg)
             (eq (char-before end) ?\\)
@@ -1266,7 +1266,7 @@ Note that this is a strict tail, so won't match, e.g. 
\"0x....\".")
        'c-digit-separator t
        ?'))))
 
-(defun c-parse-quotes-after-change (beg end old-len)
+(defun c-parse-quotes-after-change (_beg _end _old-len)
   ;; This function applies syntax-table properties (value '(1)) and
   ;; c-digit-separator properties as needed to 's within the range (c-new-BEG
   ;; c-new-END).  This operation is performed even within strings and
@@ -1274,7 +1274,7 @@ Note that this is a strict tail, so won't match, e.g. 
\"0x....\".")
   ;;
   ;; This function is called exclusively as an after-change function via the
   ;; variable `c-before-font-lock-functions'.
-  (c-save-buffer-state (p-limit limits num-beg num-end clear-from-BEG-to)
+  (c-save-buffer-state (num-beg num-end)
     ;; Apply the needed syntax-table and c-digit-separator text properties to
     ;; quotes.
     (goto-char c-new-BEG)
diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el
index ccd4fd2..2ae90ce 100644
--- a/lisp/progmodes/cc-vars.el
+++ b/lisp/progmodes/cc-vars.el
@@ -87,7 +87,7 @@ use c-constant-symbol instead."
   :value nil
   :tag "Symbol"
   :format "%t: %v\n%d"
-  :match (lambda (widget value) (symbolp value))
+  :match (lambda (_widget value) (symbolp value))
   :value-to-internal
   (lambda (widget value)
     (let ((s (if (symbolp value)
@@ -98,7 +98,7 @@ use c-constant-symbol instead."
          (setq s (concat s (make-string (- l (length s)) ?\ ))))
       s))
   :value-to-external
-  (lambda (widget value)
+  (lambda (_widget value)
     (if (stringp value)
        (intern (progn
                  (string-match "\\`[^ ]*" value)
@@ -109,14 +109,14 @@ use c-constant-symbol instead."
   "An integer or the value nil."
   :value nil
   :tag "Optional integer"
-  :match (lambda (widget value) (or (integerp value) (null value))))
+  :match (lambda (_widget value) (or (integerp value) (null value))))
 
 (define-widget 'c-symbol-list 'sexp
   "A single symbol or a list of symbols."
   :tag "Symbols separated by spaces"
   :validate 'widget-field-validate
   :match
-  (lambda (widget value)
+  (lambda (_widget value)
     (or (symbolp value)
        (catch 'ok
          (while (listp value)
@@ -125,7 +125,7 @@ use c-constant-symbol instead."
            (setq value (cdr value)))
          (null value))))
   :value-to-internal
-  (lambda (widget value)
+  (lambda (_widget value)
     (cond ((null value)
           "")
          ((symbolp value)
@@ -138,7 +138,7 @@ use c-constant-symbol instead."
          (t
           value)))
   :value-to-external
-  (lambda (widget value)
+  (lambda (_widget value)
     (if (stringp value)
        (let (list end)
          (while (string-match "\\S +" value end)
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 464b931..6f16912 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -273,7 +273,7 @@
 (autoload 'help-function-arglist "help-fns")
 
 ;;;###autoload
-(add-to-list 'auto-mode-alist (cons (purecopy "\\.pyw?\\'")  'python-mode))
+(add-to-list 'auto-mode-alist (cons (purecopy "\\.py[iw]?\\'") 'python-mode))
 ;;;###autoload
 (add-to-list 'interpreter-mode-alist (cons (purecopy "python[0-9.]*") 
'python-mode))
 
diff --git a/src/bytecode.c b/src/bytecode.c
index e781a87..a473dfb 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -452,14 +452,6 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, 
Lisp_Object maxdepth,
         the table clearer.  */
 #define LABEL(OP) [OP] = &&insn_ ## OP
 
-#if GNUC_PREREQ (4, 6, 0)
-# pragma GCC diagnostic push
-# pragma GCC diagnostic ignored "-Woverride-init"
-#elif defined __clang__
-# pragma GCC diagnostic push
-# pragma GCC diagnostic ignored "-Winitializer-overrides"
-#endif
-
       /* This is the dispatch table for the threaded interpreter.  */
       static const void *const targets[256] =
        {
@@ -471,10 +463,6 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, 
Lisp_Object maxdepth,
 #undef DEFINE
        };
 
-#if GNUC_PREREQ (4, 6, 0) || defined __clang__
-# pragma GCC diagnostic pop
-#endif
-
 #endif
 
 
diff --git a/src/character.c b/src/character.c
index cf46054..1c6020e 100644
--- a/src/character.c
+++ b/src/character.c
@@ -1050,9 +1050,26 @@ blankp (int c)
   return XINT (category) == UNICODE_CATEGORY_Zs; /* separator, space */
 }
 
+signed char HEXDIGIT_CONST hexdigit[UCHAR_MAX + 1] =
+  {
+#if HEXDIGIT_IS_CONST
+    [0 ... UCHAR_MAX] = -1,
+#endif
+    ['0'] = 0, ['1'] = 1, ['2'] = 2, ['3'] = 3, ['4'] = 4,
+    ['5'] = 5, ['6'] = 6, ['7'] = 7, ['8'] = 8, ['9'] = 9,
+    ['A'] = 10, ['B'] = 11, ['C'] = 12, ['D'] = 13, ['E'] = 14, ['F'] = 15,
+    ['a'] = 10, ['b'] = 11, ['c'] = 12, ['d'] = 13, ['e'] = 14, ['f'] = 15
+  };
+
 void
 syms_of_character (void)
 {
+#if !HEXDIGIT_IS_CONST
+  /* Set the non-hex digit values to -1.  */
+  for (int i = 0; i <= UCHAR_MAX; i++)
+    hexdigit[i] -= i != '0' && !hexdigit[i];
+#endif
+
   DEFSYM (Qcharacterp, "characterp");
   DEFSYM (Qauto_fill_chars, "auto-fill-chars");
 
diff --git a/src/character.h b/src/character.h
index 62d252e..b073a0d 100644
--- a/src/character.h
+++ b/src/character.h
@@ -700,6 +700,24 @@ char_table_translate (Lisp_Object obj, int ch)
   return CHARACTERP (obj) ? XINT (obj) : ch;
 }
 
+#if defined __GNUC__ && !defined __STRICT_ANSI__
+# define HEXDIGIT_CONST const
+# define HEXDIGIT_IS_CONST true
+#else
+# define HEXDIGIT_CONST
+# define HEXDIGIT_IS_CONST false
+#endif
+extern signed char HEXDIGIT_CONST hexdigit[];
+
+/* If C is a hexadecimal digit ('0'-'9', 'a'-'f', 'A'-'F'), return its
+   value (0-15).  Otherwise return -1.  */
+
+INLINE int
+char_hexdigit (int c)
+{
+  return 0 <= c && c <= UCHAR_MAX ? hexdigit[c] : -1;
+}
+
 INLINE_HEADER_END
 
 #endif /* EMACS_CHARACTER_H */
diff --git a/src/charset.c b/src/charset.c
index d0840f7..9c3b8db 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -33,7 +33,6 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
 #include <unistd.h>
 #include <limits.h>
 #include <sys/types.h>
-#include <c-ctype.h>
 #include "lisp.h"
 #include "character.h"
 #include "charset.h"
@@ -434,14 +433,15 @@ read_hex (FILE *fp, bool *eof, bool *overflow)
       return 0;
     }
   n = 0;
-  while (c_isxdigit (c = getc_unlocked (fp)))
+  while (true)
     {
+      c = getc_unlocked (fp);
+      int digit = char_hexdigit (c);
+      if (digit < 0)
+       break;
       if (INT_LEFT_SHIFT_OVERFLOW (n, 4))
        *overflow = 1;
-      n = ((n << 4)
-          | (c - ('0' <= c && c <= '9' ? '0'
-                  : 'A' <= c && c <= 'F' ? 'A' - 10
-                  : 'a' - 10)));
+      n = (n << 4) + digit;
     }
   if (c != EOF)
     ungetc (c, fp);
diff --git a/src/editfns.c b/src/editfns.c
index da99c05..d599fcf 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -4704,10 +4704,8 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool 
message)
                  char src0 = src[0];
                  int exponent_bytes = 0;
                  bool signedp = src0 == '-' || src0 == '+' || src0 == ' ';
-                 if (zero_flag
-                     && ((src[signedp] >= '0' && src[signedp] <= '9')
-                         || (src[signedp] >= 'a' && src[signedp] <= 'f')
-                         || (src[signedp] >= 'A' && src[signedp] <= 'F')))
+                 unsigned char after_sign = src[signedp];
+                 if (zero_flag && 0 <= char_hexdigit (after_sign))
                    {
                      leading_zeros += padding;
                      padding = 0;
diff --git a/src/image.c b/src/image.c
index 07c4769..91749fb 100644
--- a/src/image.c
+++ b/src/image.c
@@ -2444,7 +2444,8 @@ static struct image_type xbm_type =
 enum xbm_token
 {
   XBM_TK_IDENT = 256,
-  XBM_TK_NUMBER
+  XBM_TK_NUMBER,
+  XBM_TK_OVERFLOW
 };
 
 
@@ -2586,6 +2587,7 @@ xbm_scan (char **s, char *end, char *sval, int *ival)
   else if (c_isdigit (c))
     {
       int value = 0, digit;
+      bool overflow = false;
 
       if (c == '0' && *s < end)
        {
@@ -2595,23 +2597,22 @@ xbm_scan (char **s, char *end, char *sval, int *ival)
              while (*s < end)
                {
                  c = *(*s)++;
-                 if (c_isdigit (c))
-                   digit = c - '0';
-                 else if (c >= 'a' && c <= 'f')
-                   digit = c - 'a' + 10;
-                 else if (c >= 'A' && c <= 'F')
-                   digit = c - 'A' + 10;
-                 else
+                 digit = char_hexdigit (c);
+                 if (digit < 0)
                    break;
-                 value = 16 * value + digit;
+                 overflow |= INT_MULTIPLY_WRAPV (value, 16, &value);
+                 value += digit;
                }
            }
-         else if (c_isdigit (c))
+         else if ('0' <= c && c <= '7')
            {
              value = c - '0';
              while (*s < end
-                    && (c = *(*s)++, c_isdigit (c)))
-               value = 8 * value + c - '0';
+                    && (c = *(*s)++, '0' <= c && c <= '7'))
+               {
+                 overflow |= INT_MULTIPLY_WRAPV (value, 8, &value);
+                 value += c - '0';
+               }
            }
        }
       else
@@ -2619,13 +2620,16 @@ xbm_scan (char **s, char *end, char *sval, int *ival)
          value = c - '0';
          while (*s < end
                 && (c = *(*s)++, c_isdigit (c)))
-           value = 10 * value + c - '0';
+           {
+             overflow |= INT_MULTIPLY_WRAPV (value, 10, &value);
+             overflow |= INT_ADD_WRAPV (value, c - '0', &value);
+           }
        }
 
       if (*s < end)
        *s = *s - 1;
       *ival = value;
-      return XBM_TK_NUMBER;
+      return overflow ? XBM_TK_OVERFLOW : XBM_TK_NUMBER;
     }
   else if (c_isalpha (c) || c == '_')
     {
diff --git a/src/lread.c b/src/lread.c
index 182f962..7c554ba 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -2426,25 +2426,13 @@ read_escape (Lisp_Object readcharfun, bool stringp)
        while (1)
          {
            c = READCHAR;
-           if (c >= '0' && c <= '9')
-             {
-               i *= 16;
-               i += c - '0';
-             }
-           else if ((c >= 'a' && c <= 'f')
-                    || (c >= 'A' && c <= 'F'))
-             {
-               i *= 16;
-               if (c >= 'a' && c <= 'f')
-                 i += c - 'a' + 10;
-               else
-                 i += c - 'A' + 10;
-             }
-           else
+           int digit = char_hexdigit (c);
+           if (digit < 0)
              {
                UNREAD (c);
                break;
              }
+           i = (i << 4) + digit;
            /* Allow hex escapes as large as ?\xfffffff, because some
               packages use them to denote characters with modifiers.  */
            if ((CHAR_META | (CHAR_META - 1)) < i)
@@ -2474,11 +2462,10 @@ read_escape (Lisp_Object readcharfun, bool stringp)
            c = READCHAR;
            /* `isdigit' and `isalpha' may be locale-specific, which we don't
               want.  */
-           if      (c >= '0' && c <= '9')  i = (i << 4) + (c - '0');
-           else if (c >= 'a' && c <= 'f')  i = (i << 4) + (c - 'a') + 10;
-            else if (c >= 'A' && c <= 'F')  i = (i << 4) + (c - 'A') + 10;
-           else
+           int digit = char_hexdigit (c);
+           if (digit < 0)
              error ("Non-hex digit used for Unicode escape");
+           i = (i << 4) + digit;
          }
        if (i > 0x10FFFF)
          error ("Non-Unicode character: 0x%x", i);
diff --git a/src/regex.c b/src/regex.c
index 240a91f..fb48765 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -306,9 +306,7 @@ enum syntaxcode { Swhitespace = 0, Sword = 1, Ssymbol = 2 };
 /* In Emacs, these are only used for single-byte characters.  */
 # define ISDIGIT(c) ((c) >= '0' && (c) <= '9')
 # define ISCNTRL(c) ((c) < ' ')
-# define ISXDIGIT(c) (((c) >= '0' && (c) <= '9')               \
-                    || ((c) >= 'a' && (c) <= 'f')      \
-                    || ((c) >= 'A' && (c) <= 'F'))
+# define ISXDIGIT(c) (0 <= char_hexdigit (c))
 
 /* The rest must handle multibyte characters.  */
 
diff --git a/test/lisp/electric-tests.el b/test/lisp/electric-tests.el
index 9dd2766..c4ccec7 100644
--- a/test/lisp/electric-tests.el
+++ b/test/lisp/electric-tests.el
@@ -706,8 +706,7 @@ baz\"\""
   :test-in-comments nil :test-in-strings nil)
 
 (define-electric-pair-test electric-quote-markdown-in-code
-  #("`a`" 1 2 (face font-lock-constant-face)) "-'"
-  :expected-string "`'a`" :expected-point 3
+  "`a`" "-'" :expected-string "`'a`" :expected-point 3
   :modes '(text-mode)
   :fixture-fn (lambda ()
                 (electric-quote-local-mode)
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 31cf7f9..6c02daa 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -3739,6 +3739,8 @@ process sentinels.  They shall not disturb each other."
 
             ;; Open asynchronous processes.  Set process filter and sentinel.
             (dolist (buf buffers)
+             ;; Activate timer.
+             (sit-for 0.01 'nodisp)
               (let ((proc
                      (start-file-process-shell-command
                       (buffer-name buf) buf
@@ -3768,6 +3770,8 @@ process sentinels.  They shall not disturb each other."
             ;; with regular operation.
             (let ((buffers (copy-sequence buffers)))
               (while buffers
+               ;; Activate timer.
+               (sit-for 0.01 'nodisp)
                 (let* ((buf (nth (random (length buffers)) buffers))
                        (proc (get-buffer-process buf))
                        (file (process-get proc 'foo))
@@ -3808,31 +3812,34 @@ process sentinels.  They shall not disturb each other."
   "Check that Tramp does not fail due to recursive load."
   (skip-unless (tramp--test-enabled))
 
-  (dolist (code
-          (list
-           (format "(expand-file-name %S)" tramp-test-temporary-file-directory)
-           (format
-            "(let ((default-directory %S)) (expand-file-name %S))"
-            tramp-test-temporary-file-directory
-            temporary-file-directory)))
-    (should-not
-     (string-match
-      "Recursive load"
-      (shell-command-to-string
-       (format
-       "%s -batch -Q -L %s --eval %s"
-       (expand-file-name invocation-name invocation-directory)
-       (mapconcat 'shell-quote-argument load-path " -L ")
-       (shell-quote-argument code)))))))
+  (let ((default-directory (expand-file-name temporary-file-directory)))
+    (dolist (code
+            (list
+             (format
+              "(expand-file-name %S)" tramp-test-temporary-file-directory)
+             (format
+              "(let ((default-directory %S)) (expand-file-name %S))"
+              tramp-test-temporary-file-directory
+              temporary-file-directory)))
+      (should-not
+       (string-match
+       "Recursive load"
+       (shell-command-to-string
+        (format
+         "%s -batch -Q -L %s --eval %s"
+         (expand-file-name invocation-name invocation-directory)
+         (mapconcat 'shell-quote-argument load-path " -L ")
+         (shell-quote-argument code))))))))
 
 (ert-deftest tramp-test38-remote-load-path ()
   "Check that Tramp autoloads its packages with remote `load-path'."
   ;; `tramp-cleanup-all-connections' is autoloaded from tramp-cmds.el.
   ;; It shall still work, when a remote file name is in the
   ;; `load-path'.
-  (let ((code
-        "(let ((force-load-messages t)\
-               (load-path (cons \"/foo:bar:\" load-path)))\
+  (let ((default-directory (expand-file-name temporary-file-directory))
+       (code
+        "(let ((force-load-messages t) \
+               (load-path (cons \"/foo:bar:\" load-path))) \
            (tramp-cleanup-all-connections))"))
     (should
      (string-match



reply via email to

[Prev in Thread] Current Thread [Next in Thread]