emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/org-contrib ce656a5948: lisp/ox-freemind.el: Switch to lex


From: ELPA Syncer
Subject: [nongnu] elpa/org-contrib ce656a5948: lisp/ox-freemind.el: Switch to lexical binding
Date: Thu, 7 Dec 2023 07:00:05 -0500 (EST)

branch: elpa/org-contrib
commit ce656a5948f63352a5495bdb1f2ec24c796a9967
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>

    lisp/ox-freemind.el: Switch to lexical binding
    
    * lisp/ox-freemind.el (org-freemind-style-map--default):
    (org-freemind-inner-template):
    (org-freemind-entity):
    (org-freemind-final-function):
    (org-freemind-options-function): Remove unused function arguments.
    (org-freemind-headline): Remove unused let-bindings.
---
 lisp/ox-freemind.el | 47 +++++++++++------------------------------------
 1 file changed, 11 insertions(+), 36 deletions(-)

diff --git a/lisp/ox-freemind.el b/lisp/ox-freemind.el
index c4816b625a..4e66524778 100644
--- a/lisp/ox-freemind.el
+++ b/lisp/ox-freemind.el
@@ -1,4 +1,4 @@
-;;; ox-freemind.el --- Freemind Mindmap Back-End for Org Export Engine
+;;; ox-freemind.el --- Freemind Mindmap Back-End for Org Export Engine  -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 2013-2021  Free Software Foundation, Inc.
 
@@ -194,11 +194,8 @@ mappings of different outline levels."
        (assoc-default 'default org-freemind-styles)
        "<node></node>")))
 
-(defun org-freemind-style-map--default (element info)
-  "Return the default style for all ELEMENTs.
-ELEMENT can be any of the following types - `org-data',
-`headline' or `section'.  See `org-freemind-styles' for current
-value of default style."
+(defun org-freemind-style-map--default (_ _)
+  "Return the default style from `org-freemind-styles'."
   (or (assoc-default 'default org-freemind-styles)
       "<node></node>"))
 
@@ -366,10 +363,9 @@ original parsed data.  INFO is a plist holding export 
options."
     (let ((org-data (plist-get info :parse-tree)))
       (org-freemind--build-node-contents org-data contents info)))))
 
-(defun org-freemind-inner-template (contents info)
+(defun org-freemind-inner-template (contents _)
   "Return body of document string after Freemind Mindmap conversion.
-CONTENTS is the transcoded contents string.  INFO is a plist
-holding export options."
+CONTENTS is the transcoded contents string."
   contents)
 
 ;;;; Tags
@@ -385,10 +381,8 @@ holding export options."
 
 ;;;; Entity
 
-(defun org-freemind-entity (entity contents info)
-  "Transcode an ENTITY object from Org to Freemind Mindmap.
-CONTENTS are the definition itself.  INFO is a plist holding
-contextual information."
+(defun org-freemind-entity (entity _ _)
+  "Transcode an ENTITY object from Org to Freemind Mindmap."
   (org-element-property :utf-8 entity))
 
 ;;;; Headline
@@ -399,25 +393,9 @@ CONTENTS holds the contents of the headline.  INFO is a 
plist
 holding contextual information."
   ;; Empty contents?
   (setq contents (or contents ""))
-  (let* ((numberedp (org-export-numbered-headline-p headline info))
-        (level (org-export-get-relative-level headline info))
-        (text (org-export-data (org-element-property :title headline) info))
-        (todo (and (plist-get info :with-todo-keywords)
-                   (let ((todo (org-element-property :todo-keyword headline)))
-                     (and todo (org-export-data todo info)))))
-        (todo-type (and todo (org-element-property :todo-type headline)))
+  (let* ((level (org-export-get-relative-level headline info))
         (tags (and (plist-get info :with-tags)
                    (org-export-get-tags headline info)))
-        (priority (and (plist-get info :with-priority)
-                       (org-element-property :priority headline)))
-        (section-number (and (not (org-export-low-level-p headline info))
-                             (org-export-numbered-headline-p headline info)
-                             (mapconcat 'number-to-string
-                                        (org-export-get-headline-number
-                                         headline info) ".")))
-        ;; Create the headline text.
-        (full-text (org-export-data (org-element-property :title headline)
-                                    info))
         ;; Headline order (i.e, first digit of the section number)
         (headline-order (car (org-export-get-headline-number headline info))))
     (cond
@@ -437,7 +415,6 @@ holding contextual information."
                                (concat "sec-" section-number)
                                (org-element-property :ID headline))))
             (preferred-id (car ids))
-            (extra-ids (cdr ids))
             (left-p (zerop (% headline-order 2))))
        (org-freemind--build-stylized-node
         (org-freemind--get-node-style headline info)
@@ -463,7 +440,7 @@ holding contextual information."
 
 ;;; Filter Functions
 
-(defun org-freemind-final-function (contents backend info)
+(defun org-freemind-final-function (contents _ _)
   "Return CONTENTS as pretty XML using `indent-region'."
   (if (not org-freemind-pretty-output) contents
     (with-temp-buffer
@@ -472,10 +449,8 @@ holding contextual information."
       (indent-region (point-min) (point-max))
       (buffer-substring-no-properties (point-min) (point-max)))))
 
-(defun org-freemind-options-function (info backend)
-  "Install script in export options when appropriate.
-EXP-PLIST is a plist containing export options.  BACKEND is the
-export back-end currently used."
+(defun org-freemind-options-function (info _)
+  "Install script in export options INFO when appropriate."
   ;; Freemind/Freeplane doesn't seem to like named html entities in
   ;; richcontent.  For now, turn off smart quote processing so that
   ;; entities like "&rsquo;" & friends are avoided in the exported



reply via email to

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