"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "style/exam.el" between
auctex-12.2.tar.gz and auctex-12.3.tar.gz

About: AUCTEX is an extensible package for writing and formatting TeX files in GNU Emacs and XEmacs.

exam.el  (auctex-12.2):exam.el  (auctex-12.3)
;;; exam.el --- AUCTeX style for the (LaTeX) exam class ;;; exam.el --- AUCTeX style for the (LaTeX) exam class
;; Copyright (C) 2016--2018 Free Software Foundation, Inc. ;; Copyright (C) 2016--2020 Free Software Foundation, Inc.
;; Author: Uwe Brauer <oub@mat.ucm.es> ;; Author: Uwe Brauer <oub@mat.ucm.es>
;; Created: 2016-03-06 ;; Created: 2016-03-06
;; Keywords: tex ;; Keywords: tex
;; This file is part of AUCTeX. ;; This file is part of AUCTeX.
;; AUCTeX is free software; you can redistribute it and/or modify it ;; AUCTeX is free software; you can redistribute it and/or modify it
;; under the terms of the GNU General Public License as published by ;; under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option) ;; the Free Software Foundation; either version 3, or (at your option)
skipping to change at line 63 skipping to change at line 63
Item inserted depends on the environment." Item inserted depends on the environment."
(TeX-insert-macro (TeX-insert-macro
(cond ((string= environment "questions") (cond ((string= environment "questions")
"question") "question")
((string= environment "parts") ((string= environment "parts")
"part") "part")
((string= environment "subparts") ((string= environment "subparts")
"subpart") "subpart")
((string= environment "subsubparts") ((string= environment "subsubparts")
"subsubpart") "subsubpart")
((member environment '("choices" "oneparchoices"
"checkboxes" "oneparcheckboxes"))
"choice")
;; Fallback ;; Fallback
(t "item")))) (t "item"))))
(defun LaTeX-exam-insert-label (_optional &optional name type) (defun LaTeX-exam-insert-label (_optional &optional name type)
"Indent the line and query/insert a label incl. the \"\\label\" macro. "Indent the line and query/insert a label incl. the \"\\label\" macro.
Arguments NAME and TYPE are the same as for the function Arguments NAME and TYPE are the same as for the function
`LaTeX-label'. OPTIONAL is ignored." `LaTeX-label'. OPTIONAL is ignored."
(indent-according-to-mode) (indent-according-to-mode)
(let ((currenv (LaTeX-current-environment))) (let ((currenv (LaTeX-current-environment)))
(LaTeX-label (or name currenv) (or type 'environment)))) (LaTeX-label (or name currenv) (or type 'environment))))
skipping to change at line 97 skipping to change at line 100
`((,env ,LaTeX-exam-reftex-quick-id-key ,LaTeX-exam-label `((,env ,LaTeX-exam-reftex-quick-id-key ,LaTeX-exam-label
"~\\ref{%s}" nil "~\\ref{%s}" nil
(regexp "[Qq]uestions?" "[Nn]umbers?"))))))) (regexp "[Qq]uestions?" "[Nn]umbers?")))))))
(when (or (member "xcolor" (TeX-style-list)) (when (or (member "xcolor" (TeX-style-list))
(member "color" (TeX-style-list))) (member "color" (TeX-style-list)))
(TeX-add-symbols '("shadedsolutions" 0))) (TeX-add-symbols '("shadedsolutions" 0)))
(LaTeX-add-environments (LaTeX-add-environments
'("solution" [ "Height" ]) '("solution" [ "Height" ])
'("select") '("select")
'("choices" LaTeX-env-item)
'("oneparchoices" LaTeX-env-item)
'("checkboxes" LaTeX-env-item)
'("oneparcheckboxes" LaTeX-env-item)
'("solutionorbox" [ "Height" ]) '("solutionorbox" [ "Height" ])
'("solutionorlines" [ "Height" ]) '("solutionorlines" [ "Height" ])
'("solutionordottedlines" [ "Height" ]) '("solutionordottedlines" [ "Height" ])
'("solutionorgrid" [ "Height" ]) '("solutionorgrid" [ "Height" ])
'("questions" LaTeX-env-item) '("questions" LaTeX-env-item)
'("parts" LaTeX-env-item) '("parts" LaTeX-env-item)
'("subparts" LaTeX-env-item) '("subparts" LaTeX-env-item)
'("subsubparts" LaTeX-env-item)) '("subsubparts" LaTeX-env-item))
;; Tell AUCTeX about special environments: ;; Tell AUCTeX about special environments:
(let ((envs '("questions" "parts" "subparts" "subsubparts"))) (let ((envs '("questions"
"parts" "subparts" "subsubparts"
"choices" "oneparchoices"
"checkboxes" "oneparcheckboxes")))
(dolist (env envs) (dolist (env envs)
(add-to-list 'LaTeX-item-list (add-to-list 'LaTeX-item-list
(cons env 'LaTeX-exam-insert-item)))) (cons env 'LaTeX-exam-insert-item)
t)))
;; Append us only once: ;; Append us only once:
(unless (and (string-match "question" LaTeX-item-regexp) (unless (and (string-match "question" LaTeX-item-regexp)
(string-match "subsub" LaTeX-item-regexp)) (string-match "sub" LaTeX-item-regexp))
(set (make-local-variable 'LaTeX-item-regexp) (set (make-local-variable 'LaTeX-item-regexp)
(concat (concat
LaTeX-item-regexp LaTeX-item-regexp
"\\|" "\\|"
"choice\\b"
"\\|"
"\\(titled\\)?question\\b" "\\(titled\\)?question\\b"
"\\|" "\\|"
"\\(sub\\|subsub\\)?part\\b")) "\\(sub\\)*part\\b"))
(LaTeX-set-paragraph-start)) (LaTeX-set-paragraph-start))
(TeX-add-symbols (TeX-add-symbols
'("part" [ "Points" ] (TeX-arg-literal " ")) '("part" [ "Points" ] (TeX-arg-literal " "))
'("subpart" [ "Points" ] (TeX-arg-literal " ")) '("subpart" [ "Points" ] (TeX-arg-literal " "))
'("gradetable" '("gradetable"
[ TeX-arg-eval completing-read [ TeX-arg-eval completing-read
(TeX-argument-prompt optional nil "Orientation") (TeX-argument-prompt optional nil "Orientation")
'("v" "h") ] '("v" "h") ]
[ TeX-arg-eval completing-read [ TeX-arg-eval completing-read
skipping to change at line 232 skipping to change at line 245
'("bvsword" 1) '("bvsword" 1)
'("bvtword" 1) '("bvtword" 1)
'("cancelspace" 0) '("cancelspace" 0)
'("cellwidth" 1) '("cellwidth" 1)
'("cfoot" 1) '("cfoot" 1)
'("chbpword" 1) '("chbpword" 1)
'("chead" 1) '("chead" 1)
'("checkboxchar" 1) '("checkboxchar" 1)
'("checkboxeshook" 0) '("checkboxeshook" 0)
'("checkedchar" 1) '("checkedchar" 1)
'("choice" 0) '("choice" (TeX-arg-literal " "))
'("choicelabel" 0) '("choicelabel" 0)
'("choiceshook" 0) '("choiceshook" 0)
'("chpgword" 1) '("chpgword" 1)
'("chpword" 1) '("chpword" 1)
'("chqword" 1) '("chqword" 1)
'("chsword" 1) '("chsword" 1)
'("chsword" 1) '("chsword" 1)
'("correctchoice" 0) '("correctchoice" 0)
'("correctchoiceemphasis" 1) '("correctchoiceemphasis" 1)
'("covercfoot" 3) '("covercfoot" 3)
 End of changes. 9 change blocks. 
6 lines changed or deleted 19 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)