title: Get outermost list from the current point
body: <p>From the point current position inside an Emacs buffer, how can I get the outermost list/s-expression which contains that point ?<br>
  Follows a few examples in order to illustrate what I want to achieve:</p>
  
  <p>Example 1:</p>
  
  <pre><code>(defun xpto(arg)
    (+ 2 4)[point])
  </code></pre>
  
  <p>Output 1: </p>
  
  <pre><code>(defun xpto(arg)
        (+ 2 4))
  </code></pre>
  
  <p>Example 2:</p>
  
  <pre><code>(defun [point]xpto(arg)
    (+ 2 4))
  </code></pre>
  
  <p>Output 2: </p>
  
  <pre><code>(defun xpto(arg)
        (+ 2 4))
  </code></pre>
  
  <p>Example 3:</p>
  
  <pre><code>(defun xpto(arg)
    (+ 2 4))[point]
  </code></pre>
  
  <p>Output 3: </p>
  
  <pre><code>NIL
  </code></pre>
  
  <p>Is there any "off the shelf" function provided by Emacs that accomplishes the above mentioned behavior?<br>
  If not, can you guide me towards the easier approach in order to accomplish it ?</p>
  
  <p>UPDATE #1</p>
  
  <p>As suggested I tried the following approach:</p>
  
  <pre><code>;; Gets the outermost brackets based on point position
  (defun get-outermost-brackets()
    (interactive)
    (car (last (nth 9 (syntax-ppss)))))
  
  
  ;; Assigns that function to a key
  (global-set-key [(control p)] 'get-outermost-brackets)
  </code></pre>
  
  <p>However, after pressing CTRL+P I get no output no matter where the point is at.<br>
  What am I doing wrong ?</p>