]> code.delx.au - gnu-emacs-elpa/commitdiff
* packages/gnome-c-style/gnome-c-tests.el: Add copyright blurb
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 21 Jan 2016 22:49:19 +0000 (17:49 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 21 Jan 2016 22:49:19 +0000 (17:49 -0500)
admin/archive-contents.el
packages/ada-mode/ada-mode.el
packages/dts-mode/dts-mode.el
packages/f90-interface-browser/f90-interface-browser.el
packages/hydra/hydra.el
packages/js2-mode/js2-mode.el
packages/lex/lex.el
packages/on-screen/on-screen.el
packages/wisi/wisi-compile.el
packages/ztree/ztree-diff-model.el
packages/ztree/ztree-view.el

index b63f4cdaf94dfbf8c2c858967121f287dd392d4e..8f054ad8723a4cb5a2839ec8aacba14838e33059 100755 (executable)
@@ -622,12 +622,13 @@ If WITH-CORE is non-nil, it means we manage :core packages as well."
         ;; Not under version control.  Check if it only contains
         ;; symlinks and generated files, in which case it is probably
         ;; a leftover :core package that can safely be deleted.
         ;; Not under version control.  Check if it only contains
         ;; symlinks and generated files, in which case it is probably
         ;; a leftover :core package that can safely be deleted.
-        (let ((file (archive--find-non-trivial-file dir)))
-          (if file
-              (message "Keeping %s for non-trivial file \"%s\"" dir file)
-            (progn
-              (message "Deleted untracked package %s" dir)
-              (delete-directory dir 'recursive t)))))))))
+        ;; (let ((file (archive--find-non-trivial-file dir)))
+        ;;   (if file
+        ;;       (message "Keeping %s for non-trivial file \"%s\"" dir file)
+        ;;     (progn
+        ;;       (message "Deleted untracked package %s" dir)
+        ;;       (delete-directory dir 'recursive t))))
+        )))))
 
 (defun archive--external-package-sync (name)
   "Sync external package named NAME."
 
 (defun archive--external-package-sync (name)
   "Sync external package named NAME."
index 3fca118d96982551de8c966007729930c461646f..8fb112a49d0372774cd326e22b4f4f46ce0b8d04 100644 (file)
@@ -2598,8 +2598,8 @@ If POSTFIX and JUSTIFY are non-nil, `ada-fill-comment-postfix' is appended
 to each line filled and justified.
 The paragraph is indented on the first line."
   (interactive "P")
 to each line filled and justified.
 The paragraph is indented on the first line."
   (interactive "P")
-  (if (and (not (ada-in-comment-p))
-          (not (looking-at "[ \t]*--")))
+  (if (not (or (ada-in-comment-p)
+               (looking-at "[ \t]*--")))
       (error "Not inside comment"))
 
   ;; fill-region-as-paragraph leaves comment text exposed (without
       (error "Not inside comment"))
 
   ;; fill-region-as-paragraph leaves comment text exposed (without
index 99aff26029898ba8dd2184703dee8b01ae810285..e1ce4fdf8b77e14aa046aa60a4bde556cef698a5 100644 (file)
   (dts--using-macro syntax-propertize-rules
     (set (make-local-variable 'syntax-propertize-function)
          (syntax-propertize-rules
   (dts--using-macro syntax-propertize-rules
     (set (make-local-variable 'syntax-propertize-function)
          (syntax-propertize-rules
-          ("#include[ \t]+\\(<\\).*\\(>\\)" (1 "|") (2 "|")))))
+          ("#include[ \t]+\\(<\\).*\\(>\\)" (1 "|") (2 "|"))
+          ;; Treat things like /delete-property/ as a single identifier.
+          ("\\(/\\)[a-z]+\\(/\\)" (1 "_") (2 "_")))))
   (if dts-use-smie
       (smie-setup dts-grammar #'dts-indent-rules)
     (set (make-local-variable 'indent-line-function) #'dts-indent-line)))
   (if dts-use-smie
       (smie-setup dts-grammar #'dts-indent-rules)
     (set (make-local-variable 'indent-line-function) #'dts-indent-line)))
index d499ba021a0f8dc8bcc06dc96690eae07a35f7aa..8113a8bc5618689128b82da4062e3193547c893a 100644 (file)
@@ -1,6 +1,6 @@
 ;;; f90-interface-browser.el --- Parse and browse f90 interfaces
 
 ;;; f90-interface-browser.el --- Parse and browse f90 interfaces
 
-;; Copyright (C) 2011, 2012, 2013, 2014  Free Software Foundation, Inc
+;; Copyright (C) 2011, 2012, 2013, 2014, 2015  Free Software Foundation, Inc
 
 ;; Author: Lawrence Mitchell <wence@gmx.li>
 ;; Created: 2011-07-06
 
 ;; Author: Lawrence Mitchell <wence@gmx.li>
 ;; Created: 2011-07-06
@@ -272,7 +272,8 @@ an alphanumeric character."
   (loop for file in (directory-files dir t
                                      (rx-to-string
                                       `(and "." (or ,@f90-file-extensions)
   (loop for file in (directory-files dir t
                                      (rx-to-string
                                       `(and "." (or ,@f90-file-extensions)
-                                            eos) t))
+                                            eos)
+                                      t))
         do (f90-parse-interfaces file f90-all-interfaces)))
 
 (defun f90-find-tag-interface (name &optional match-sublist)
         do (f90-parse-interfaces file f90-all-interfaces)))
 
 (defun f90-find-tag-interface (name &optional match-sublist)
@@ -530,11 +531,11 @@ default is the type of the variable."
       "UNION-TYPE"
     ;; Ignore name
     (setq type (cdr type))
       "UNION-TYPE"
     ;; Ignore name
     (setq type (cdr type))
-    (mapconcat 'identity (loop for a in type
+    (mapconcat #'identity (loop for a in type
                                if (and (consp a)
                                        (string= (car a) "dimension"))
                                collect (format "dimension(%s)"
                                if (and (consp a)
                                        (string= (car a) "dimension"))
                                collect (format "dimension(%s)"
-                                               (mapconcat 'identity
+                                               (mapconcat #'identity
                                                           (make-list (cdr a)
                                                                      ":")
                                                           ","))
                                                           (make-list (cdr a)
                                                                      ":")
                                                           ","))
@@ -555,9 +556,10 @@ default is the type of the variable."
                          arglist "\n")))
     (f90-mode)
     (if (fboundp 'font-lock-ensure)
                          arglist "\n")))
     (f90-mode)
     (if (fboundp 'font-lock-ensure)
-        (font-lock-ensure) (font-lock-fontify-buffer))
+        (font-lock-ensure)
+      (with-no-warnings (font-lock-fontify-buffer)))
     (goto-char (point-min))
     (goto-char (point-min))
-    (mapconcat 'identity
+    (mapconcat #'identity
                (loop while (not (eobp))
                      collect (buffer-substring (line-beginning-position)
                                                (- (line-end-position)
                (loop while (not (eobp))
                      collect (buffer-substring (line-beginning-position)
                                                (- (line-end-position)
@@ -817,16 +819,16 @@ needs a reference count interface, so insert one."
 
 (defun f90-parse-type-definition ()
   "Parse a type definition at (or in front of) `point'."
 
 (defun f90-parse-type-definition ()
   "Parse a type definition at (or in front of) `point'."
-  (let (type slots slot fn)
-    (goto-char (point-min))
-    (unless (re-search-forward "^[ \t]*type[ \t]+\\(.+?\\)[ \t]*$" nil t)
-      (error "Trying parse a type but no type found"))
-    (setq type (format "type(%s)" (f90-normalise-string (match-string 1))))
+  (goto-char (point-min))
+  (unless (re-search-forward "^[ \t]*type[ \t]+\\(.+?\\)[ \t]*$" nil t)
+    (error "Trying parse a type but no type found"))
+  (let ((type (format "type(%s)" (f90-normalise-string (match-string 1))))
+        (slots ()))
     (while (not (eobp))
     (while (not (eobp))
-      (setq slot (f90-parse-single-type-declaration))
-      (when slot
-        (setf slots (nconc slot slots)))
-      (forward-line 1))
+      (let ((slot (f90-parse-single-type-declaration)))
+        (when slot
+          (setf slots (nconc slot slots)))
+        (forward-line 1)))
     (setf (gethash type f90-types) slots)))
 
 (defun f90-arglist-types ()
     (setf (gethash type f90-types) slots)))
 
 (defun f90-arglist-types ()
index a7a71acc737ddff39fce2a34b0a2f338cb8ecc34..1516c856bb699d912dce5080c711a2a5eb3fd6b4 100644 (file)
@@ -1148,6 +1148,8 @@ DOC defaults to TOGGLE-NAME split and capitalized."
                    0
                  i)))))
 
                    0
                  i)))))
 
+(require 'ring)
+
 (defvar hydra-pause-ring (make-ring 10)
   "Ring for paused hydras.")
 
 (defvar hydra-pause-ring (make-ring 10)
   "Ring for paused hydras.")
 
index 926003d5a80a1166c088b8ff8b7494bfbd462c9f..2d6f33685b79fb7bd629ac74c5883dd3da66ffc5 100644 (file)
@@ -11212,18 +11212,13 @@ highlighting features of `js2-mode'."
     map)
   "Keymap used for js2 diagnostics buffers.")
 
     map)
   "Keymap used for js2 diagnostics buffers.")
 
-(defun js2-error-buffer-mode ()
+(define-derived-mode js2-error-buffer-mode special-mode "JS Lint Diagnostics"
   "Major mode for js2 diagnostics buffers.
 Selecting an error will jump it to the corresponding source-buffer error.
 \\{js2-error-buffer-mode-map}"
   "Major mode for js2 diagnostics buffers.
 Selecting an error will jump it to the corresponding source-buffer error.
 \\{js2-error-buffer-mode-map}"
-  (interactive)
-  (setq major-mode 'js2-error-buffer-mode
-        mode-name "JS Lint Diagnostics")
-  (use-local-map js2-error-buffer-mode-map)
   (setq truncate-lines t)
   (set-buffer-modified-p nil)
   (setq truncate-lines t)
   (set-buffer-modified-p nil)
-  (setq buffer-read-only t)
-  (run-hooks 'js2-error-buffer-mode-hook))
+  (setq buffer-read-only t))
 
 (defun js2-error-buffer-next ()
   "Move to next error and view it."
 
 (defun js2-error-buffer-next ()
   "Move to next error and view it."
@@ -11252,7 +11247,7 @@ Selecting an error will jump it to the corresponding source-buffer error.
   "Scroll source buffer to show error at current line."
   (interactive)
   (cond
   "Scroll source buffer to show error at current line."
   (interactive)
   (cond
-   ((not (eq major-mode 'js2-error-buffer-mode))
+   ((not (derived-mode-p 'js2-error-buffer-mode))
     (message "Not in a js2 errors buffer"))
    ((not (buffer-live-p js2-source-buffer))
     (message "Source buffer has been killed"))
     (message "Not in a js2 errors buffer"))
    ((not (buffer-live-p js2-source-buffer))
     (message "Source buffer has been killed"))
index bd84f5800022c2a0d7457c0c895ab3480f6fb245..6ba8123ed2414778149eac9570460ecc2be74ccc 100644 (file)
@@ -1,6 +1,6 @@
 ;;; lex.el --- Lexical analyser construction  -*- lexical-binding:t -*-
 
 ;;; lex.el --- Lexical analyser construction  -*- lexical-binding:t -*-
 
-;; Copyright (C) 2008,2013,2014  Free Software Foundation, Inc.
+;; Copyright (C) 2008,2013,2014,2015  Free Software Foundation, Inc.
 
 ;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
 ;; Keywords:
 
 ;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
 ;; Keywords:
@@ -918,7 +918,15 @@ Returns a new NFA."
 
     res))
 
 
     res))
 
+;;;###autoload
 (defun lex-compile (alist)
 (defun lex-compile (alist)
+  "Compile a set of regular expressions.
+ALIST is a list of elements of the form (REGEXP . VALUE).
+The compiled automaton will match all those regexps at the same time
+and will return the VALUE fof the leftmost longest match.
+
+Each REGEXP object should be in the sexp form described in the
+Commentary section."
   (lex--dfa-wrapper
    (lambda ()
      (let* ((lex--char-equiv-table
   (lex--dfa-wrapper
    (lambda ()
      (let* ((lex--char-equiv-table
index bce3c5648fbde9187cd28f0e31e22a905f160a4f..e5c39770275ca2173104391b11adc25b50ff9d3c 100644 (file)
@@ -636,7 +636,7 @@ highlightings and clear all associated data."
   "Return non-nil if on-screen is enabled in BUFFER."
   (with-current-buffer (or buffer (current-buffer))
     (and
   "Return non-nil if on-screen is enabled in BUFFER."
   (with-current-buffer (or buffer (current-buffer))
     (and
-     (if on-screen-global-mode t on-screen-mode)
+     (or on-screen-global-mode on-screen-mode)
      (cond
       ((not on-screen-inhibit-highlighting) t)
       ((functionp on-screen-inhibit-highlighting)
      (cond
       ((not on-screen-inhibit-highlighting) t)
       ((functionp on-screen-inhibit-highlighting)
index 0251133c43940b700cdacaf19abc56606d0bbf4e..b70a1aea4b9ac4d7b12f59396c9e2a08b32980fa 100644 (file)
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 ;;
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 ;;
-;;; History: first experimental version Jan 2013
+
+;;; Commentary:
+;; 
+
+;;;; History: first experimental version Jan 2013
 ;;
 ;;
-;;; Context
+;;;; Context
 ;;
 ;; Semantic (info "(semantic)Top") provides an LALR(1) parser
 ;;
 ;; Semantic (info "(semantic)Top") provides an LALR(1) parser
-;; wisent-parse. The grammar used is defined by the functions
+;; wisent-parse.  The grammar used is defined by the functions
 ;; semantic-grammar-create-package, which reads a bison-like source
 ;; file and produces corresponding elisp source, and
 ;; wisent-compile-grammar, which generates a parser table.
 ;;
 ;; However, the algorithm used in wisent-compile-grammar cannot cope
 ;; with the grammar for the Ada language, because it is not
 ;; semantic-grammar-create-package, which reads a bison-like source
 ;; file and produces corresponding elisp source, and
 ;; wisent-compile-grammar, which generates a parser table.
 ;;
 ;; However, the algorithm used in wisent-compile-grammar cannot cope
 ;; with the grammar for the Ada language, because it is not
-;; LALR(1). So we provide a generalized LALR parser, which spawns
-;; parallel LALR parsers at each conflict. Instead of also rewriting
+;; LALR(1).  So we provide a generalized LALR parser, which spawns
+;; parallel LALR parsers at each conflict.  Instead of also rewriting
 ;; the entire semantic grammar compiler, we use the OpenToken LALR
 ;; parser generator, which is easier to modify (it is written in Ada,
 ;; not Lisp).
 ;; the entire semantic grammar compiler, we use the OpenToken LALR
 ;; parser generator, which is easier to modify (it is written in Ada,
 ;; not Lisp).
@@ -231,5 +235,4 @@ names have the format nonterm:index."
       )))
 
 (provide 'wisi-compile)
       )))
 
 (provide 'wisi-compile)
-
-;;;; end of file
+;;; wisi-compile.el ends here
index 7bec4619b633757b4ee998a855b23476ea1a8af9..e8fa4d9a236b6c7d2fc13b3176d1515ec07f58ec 100644 (file)
@@ -124,6 +124,7 @@ RIGHT if only on the right side."
 
 (defun ztree-diff-untrampify-filename (file)
   "Return FILE as the local file name."
 
 (defun ztree-diff-untrampify-filename (file)
   "Return FILE as the local file name."
+  ;; FIXME: We shouldn't use internal Tramp functions.
   (require 'tramp)
   (if (not (tramp-tramp-file-p file))
       file
   (require 'tramp)
   (if (not (tramp-tramp-file-p file))
       file
@@ -136,6 +137,10 @@ RIGHT if only on the right side."
 (defun ztree-diff-model-files-equal (file1 file2)
   "Compare files FILE1 and FILE2 using external diff.
 Returns t if equal."
 (defun ztree-diff-model-files-equal (file1 file2)
   "Compare files FILE1 and FILE2 using external diff.
 Returns t if equal."
+  ;; FIXME: This "untrampification" only works if both file1 and file2 are on
+  ;; the same host.
+  ;; FIXME: We assume that default-directory is also on the same host as
+  ;; file(1|2).
   (let* ((file1-untrampified (ztree-diff-untrampify-filename (ztree-diff-modef-quotify-string file1)))
          (file2-untrampified (ztree-diff-untrampify-filename (ztree-diff-modef-quotify-string file2)))
          (diff-command (concat "diff -q" " " file1-untrampified " " file2-untrampified))
   (let* ((file1-untrampified (ztree-diff-untrampify-filename (ztree-diff-modef-quotify-string file1)))
          (file2-untrampified (ztree-diff-untrampify-filename (ztree-diff-modef-quotify-string file2)))
          (diff-command (concat "diff -q" " " file1-untrampified " " file2-untrampified))
@@ -154,8 +159,7 @@ Filters out . and .."
   "Rescan the NODE."
   ;; assuming what parent is always exists
   ;; otherwise the UI shall force the full rescan
   "Rescan the NODE."
   ;; assuming what parent is always exists
   ;; otherwise the UI shall force the full rescan
-  (let ((parent (ztree-diff-node-parent node))
-        (isdir (ztree-diff-node-is-directory node))
+  (let ((isdir (ztree-diff-node-is-directory node))
         (left (ztree-diff-node-left-path node))
         (right (ztree-diff-node-right-path node)))
     ;; if node is a directory - traverse
         (left (ztree-diff-node-left-path node))
         (right (ztree-diff-node-right-path node)))
     ;; if node is a directory - traverse
index 519097b8e463a2cac54d69547a7182f5f8f4c935..e7f20fde04ccdfb6ce58f516e3cc39b6f3128d94 100644 (file)
@@ -543,7 +543,7 @@ Optional argument FACE face to write text with."
     (move-to-column offset t)
     (delete-region (point) (line-end-position))
     (when (> depth 0)
     (move-to-column offset t)
     (delete-region (point) (line-end-position))
     (when (> depth 0)
-      (dotimes (i depth)
+      (dotimes (_ depth)
         (insert " ")
         (insert-char ?\s 3)))           ; insert 3 spaces
     (when (> (length short-name) 0)
         (insert " ")
         (insert-char ?\s 3)))           ; insert 3 spaces
     (when (> (length short-name) 0)
@@ -584,13 +584,12 @@ Optional argument LINE scroll to the line given."
     ;; used in 2-side tree mode
     (when ztree-node-side-fun
       (setq ztree-line-tree-properties (make-hash-table)))
     ;; used in 2-side tree mode
     (when ztree-node-side-fun
       (setq ztree-line-tree-properties (make-hash-table)))
-    (toggle-read-only)
-    (erase-buffer)
-    (funcall ztree-tree-header-fun)
-    (setq ztree-start-line (line-number-at-pos (point)))
-    (ztree-insert-node-contents ztree-start-node)
-    (scroll-to-line (if line line ztree-start-line))
-    (toggle-read-only)))
+    (let ((inhibit-read-only t))
+      (erase-buffer)
+      (funcall ztree-tree-header-fun)
+      (setq ztree-start-line (line-number-at-pos (point)))
+      (ztree-insert-node-contents ztree-start-node))
+    (scroll-to-line (if line line ztree-start-line))))
 
 
 (defun ztree-view (
 
 
 (defun ztree-view (