emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] scratch/gnus-cloud d4ac0c3 31/61: Merge branch 'master' of


From: Teodor Zlatanov
Subject: [Emacs-diffs] scratch/gnus-cloud d4ac0c3 31/61: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Date: Fri, 1 Jul 2016 17:37:54 +0000 (UTC)

branch: scratch/gnus-cloud
commit d4ac0c3a04bc8f5c5122ee2c0c44648a495e6443
Merge: c402cc0 852507f
Author: Ted Zlatanov <address@hidden>
Commit: Ted Zlatanov <address@hidden>

    Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
---
 lisp/progmodes/octave.el |   43 +++----------------------------------------
 lisp/progmodes/prolog.el |   23 ++++++++++-------------
 2 files changed, 13 insertions(+), 53 deletions(-)

diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el
index f309565..4f223f2 100644
--- a/lisp/progmodes/octave.el
+++ b/lisp/progmodes/octave.el
@@ -34,31 +34,6 @@
 ;;; Code:
 (require 'comint)
 
-;;; For emacs < 24.3.
-(require 'newcomment)
-(eval-and-compile
-  (unless (fboundp 'user-error)
-    (defalias 'user-error 'error))
-  (unless (fboundp 'delete-consecutive-dups)
-    (defalias 'delete-consecutive-dups 'delete-dups))
-  (unless (fboundp 'completion-table-with-cache)
-    (defun completion-table-with-cache (fun &optional ignore-case)
-      ;; See eg bug#11906.
-      (let* (last-arg last-result
-             (new-fun
-              (lambda (arg)
-                (if (and last-arg (string-prefix-p last-arg arg ignore-case))
-                    last-result
-                  (prog1
-                      (setq last-result (funcall fun arg))
-                    (setq last-arg arg))))))
-        (completion-table-dynamic new-fun)))))
-(eval-when-compile
-  (unless (fboundp 'setq-local)
-    (defmacro setq-local (var val)
-      "Set variable VAR to value VAL in current buffer."
-      (list 'set (list 'make-local-variable (list 'quote var)) val))))
-
 (defgroup octave nil
   "Editing Octave code."
   :link '(custom-manual "(octave-mode)Top")
@@ -605,13 +580,8 @@ Key bindings:
 
   (setq-local fill-nobreak-predicate
               (lambda () (eq (octave-in-string-p) ?')))
-  (with-no-warnings
-    (if (fboundp 'add-function)         ; new in 24.4
-        (add-function :around (local 'comment-line-break-function)
-                      #'octave--indent-new-comment-line)
-      (setq-local comment-line-break-function
-                  (apply-partially #'octave--indent-new-comment-line
-                                   #'comment-indent-new-line))))
+  (add-function :around (local 'comment-line-break-function)
+                #'octave--indent-new-comment-line)
 
   (setq font-lock-defaults '(octave-font-lock-keywords))
 
@@ -908,9 +878,6 @@ startup file, `~/.emacs-octave'."
                        (inferior-octave-completion-table)
                        'comint-completion-file-name-table))))))
 
-(define-obsolete-function-alias 'inferior-octave-complete
-  'completion-at-point "24.1")
-
 (defun inferior-octave-dynamic-list-input-ring ()
   "List the buffer's input history in a help buffer."
   ;; We cannot use `comint-dynamic-list-input-ring', because it replaces
@@ -1060,8 +1027,7 @@ directory and makes this the current buffer's default 
directory."
                    (skip-syntax-backward "-(")
                    (thing-at-point 'symbol)))))
     (completing-read
-     (format (if def "Function (default %s): "
-               "Function: ") def)
+     (format (if def "Function (default %s): " "Function: ") def)
      (inferior-octave-completion-table)
      nil nil nil nil def)))
 
@@ -1448,9 +1414,6 @@ The block marked is the one that contains point or 
follows point."
                              (inferior-octave-completion-table))
                         octave-reserved-words)))))
 
-(define-obsolete-function-alias 'octave-complete-symbol
-  'completion-at-point "24.1")
-
 (defun octave-add-log-current-defun ()
   "A function for `add-log-current-defun-function' (which see)."
   (save-excursion
diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el
index 0bbf67f..2b23c51 100644
--- a/lisp/progmodes/prolog.el
+++ b/lisp/progmodes/prolog.el
@@ -271,6 +271,9 @@
 (require 'easymenu)
 (require 'align)
 
+(eval-when-compile
+  (or (fboundp 'use-region-p)
+      (defsubst use-region-p () (region-exists-p))))
 
 (defgroup prolog nil
   "Editing and running Prolog and Mercury files."
@@ -3329,12 +3332,6 @@ PREFIX is the prefix of the search regexp."
 ;; prolog buffer)
 ;;-------------------------------------------------------------------
 
-(unless (fboundp 'region-exists-p)
-  (defun region-exists-p ()
-    "Non-nil if the mark is set.  Lobotomized version for Emacsen that do not 
provide their own."
-    (mark)))
-
-
 ;; GNU Emacs ignores `easy-menu-add' so the order in which the menus
 ;; are defined _is_ important!
 
@@ -3368,7 +3365,7 @@ PREFIX is the prefix of the search regexp."
      :included (not (eq prolog-system 'mercury))]
     ["Consult buffer" prolog-consult-buffer
      :included (not (eq prolog-system 'mercury))]
-    ["Consult region" prolog-consult-region :active (region-exists-p)
+    ["Consult region" prolog-consult-region :active (use-region-p)
      :included (not (eq prolog-system 'mercury))]
     ["Consult predicate" prolog-consult-predicate
      :included (not (eq prolog-system 'mercury))]
@@ -3380,7 +3377,7 @@ PREFIX is the prefix of the search regexp."
      :included (eq prolog-system 'sicstus)]
     ["Compile buffer" prolog-compile-buffer
      :included (eq prolog-system 'sicstus)]
-    ["Compile region" prolog-compile-region :active (region-exists-p)
+    ["Compile region" prolog-compile-region :active (use-region-p)
      :included (eq prolog-system 'sicstus)]
     ["Compile predicate" prolog-compile-predicate
      :included (eq prolog-system 'sicstus)]
@@ -3418,11 +3415,11 @@ PREFIX is the prefix of the search regexp."
   prolog-edit-menu-insert-move prolog-mode-map
   "Commands for Prolog code manipulation."
   '("Prolog"
-    ["Comment region" comment-region (region-exists-p)]
-    ["Uncomment region" prolog-uncomment-region (region-exists-p)]
+    ["Comment region" comment-region (use-region-p)]
+    ["Uncomment region" prolog-uncomment-region (use-region-p)]
     ["Add comment/move to comment" indent-for-comment t]
     ["Convert variables in region to '_'" prolog-variables-to-anonymous
-     :active (region-exists-p) :included (not (eq prolog-system 'mercury))]
+     :active (use-region-p) :included (not (eq prolog-system 'mercury))]
     "---"
     ["Insert predicate template" prolog-insert-predicate-template t]
     ["Insert next clause head" prolog-insert-next-clause t]
@@ -3435,10 +3432,10 @@ PREFIX is the prefix of the search regexp."
     ["End of predicate" prolog-end-of-predicate t]
     "---"
     ["Indent line" indent-according-to-mode t]
-    ["Indent region" indent-region (region-exists-p)]
+    ["Indent region" indent-region (use-region-p)]
     ["Indent predicate" prolog-indent-predicate t]
     ["Indent buffer" prolog-indent-buffer t]
-    ["Align region" align (region-exists-p)]
+    ["Align region" align (use-region-p)]
     "---"
     ["Mark clause" prolog-mark-clause t]
     ["Mark predicate" prolog-mark-predicate t]



reply via email to

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